letify 2.11.4__tar.gz → 2.12.0__tar.gz
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.
- {letify-2.11.4 → letify-2.12.0}/PKG-INFO +4 -3
- {letify-2.11.4 → letify-2.12.0}/README.md +3 -2
- {letify-2.11.4 → letify-2.12.0}/docs/ROADMAP-3.0.md +1 -1
- {letify-2.11.4 → letify-2.12.0}/docs/SPEC.md +34 -11
- {letify-2.11.4 → letify-2.12.0}/docs/guide/02-providers.md +32 -10
- {letify-2.11.4 → letify-2.12.0}/docs/guide/09-agent.md +3 -1
- {letify-2.11.4 → letify-2.12.0}/docs/guide/ko/02-/355/224/204/353/241/234/353/260/224/354/235/264/353/215/224.md +32 -10
- {letify-2.11.4 → letify-2.12.0}/docs/guide/ko/09-/354/227/220/354/235/264/354/240/204/355/212/270.md +3 -1
- {letify-2.11.4 → letify-2.12.0}/docs/locales/README_ko.md +3 -2
- {letify-2.11.4 → letify-2.12.0}/letify/__init__.py +1 -1
- {letify-2.11.4 → letify-2.12.0}/letify/cli.py +10 -0
- {letify-2.11.4 → letify-2.12.0}/letify/config/login.py +108 -9
- {letify-2.11.4 → letify-2.12.0}/letify/providers/tunnel.py +47 -10
- {letify-2.11.4 → letify-2.12.0}/letify/transport/linkagent.py +27 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/linkchannel.py +107 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/linkshim.py +43 -1
- {letify-2.11.4 → letify-2.12.0}/letify/transport/linksignal.py +13 -1
- {letify-2.11.4 → letify-2.12.0}/letify-core/Cargo.lock +3 -3
- {letify-2.11.4 → letify-2.12.0}/letify-core/Cargo.toml +1 -1
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/punch.rs +10 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/sidecar.rs +15 -12
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/sidecar.rs +79 -9
- {letify-2.11.4 → letify-2.12.0}/letify-ext/package-lock.json +2 -2
- {letify-2.11.4 → letify-2.12.0}/letify-ext/package.json +1 -1
- {letify-2.11.4 → letify-2.12.0}/pyproject.toml +1 -1
- {letify-2.11.4 → letify-2.12.0}/tests/conftest.py +68 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_link_agent.py +2 -1
- {letify-2.11.4 → letify-2.12.0}/tests/test_link_channel.py +14 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_link_command_channel.py +31 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_link_signal.py +4 -0
- letify-2.12.0/tests/test_link_ssh_stream.py +303 -0
- letify-2.12.0/tests/test_tunnel_agent_login.py +226 -0
- {letify-2.11.4 → letify-2.12.0}/.github/workflows/ci.yml +0 -0
- {letify-2.11.4 → letify-2.12.0}/.github/workflows/docs.yml +0 -0
- {letify-2.11.4 → letify-2.12.0}/.github/workflows/letify-link.yml +0 -0
- {letify-2.11.4 → letify-2.12.0}/.github/workflows/publish-crates.yml +0 -0
- {letify-2.11.4 → letify-2.12.0}/.github/workflows/publish.yml +0 -0
- {letify-2.11.4 → letify-2.12.0}/.github/workflows/reserve-crates.yml +0 -0
- {letify-2.11.4 → letify-2.12.0}/.gitignore +0 -0
- {letify-2.11.4 → letify-2.12.0}/.researchtree +0 -0
- {letify-2.11.4 → letify-2.12.0}/CLAUDE.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/LICENSE +0 -0
- {letify-2.11.4 → letify-2.12.0}/PROJECT.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/COMPONENT.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/INTENT.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/NETWORK.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/01-getting-started.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/03-execution-modes.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/04-environments-and-data.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/05-concurrency.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/06-cost.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/07-troubleshooting.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/08-releasing.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/README.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/ko/01-/354/213/234/354/236/221/355/225/230/352/270/260.md" +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/ko/03-/354/213/244/355/226/211-/353/260/251/354/213/235.md" +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/ko/04-/355/231/230/352/262/275/352/263/274-/353/215/260/354/235/264/355/204/260.md" +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/ko/05-/353/217/231/354/213/234-/354/213/244/355/226/211.md" +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/ko/06-/353/271/204/354/232/251.md" +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/ko/07-/353/254/270/354/240/234-/355/225/264/352/262/260.md" +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/ko/08-/353/246/264/353/246/254/354/212/244.md" +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/guide/ko/README.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/docs/mkdocs.yml +0 -0
- {letify-2.11.4 → letify-2.12.0}/examples/README.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/examples/nvfp4-lora/.letify.example +0 -0
- {letify-2.11.4 → letify-2.12.0}/examples/nvfp4-lora/00_smoke.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/examples/nvfp4-lora/01_sweep.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/examples/nvfp4-lora/02_resume.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/examples/nvfp4-lora/03_watch.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/examples/nvfp4-lora/README.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/examples/nvfp4-lora/README_ko.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/examples/nvfp4-lora/common.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/examples/nvfp4-lora/recipe.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/config/__init__.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/config/inventory.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/config/schema.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/config/secrets.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/config/writer.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/declare/__init__.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/declare/cache.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/declare/env.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/declare/exit.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/declare/function.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/declare/instance.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/declare/reduce.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/declare/replicas.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/errors.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/install.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/launcher.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/paths.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/protocol/__init__.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/protocol/codec.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/protocol/driver.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/protocol/handle.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/protocol/wire.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/protocol/worker.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/__init__.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/base.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/colab.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/colab_files.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/colab_keepalive.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/elice.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/kaggle.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/kaggle_adapter.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/local.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/modal.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/modal_adapter.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/naming.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/shell.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/providers/usage.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/remoting/__init__.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/remoting/device/__init__.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/remoting/device/client.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/remoting/device/cuda.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/remoting/device/executor.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/remoting/device/frames.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/remoting/device/guard.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/remoting/device/tensor.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/remoting/device/trace.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/remoting/device/value.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/render.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/__init__.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/bootstrap.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/broker.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/channel.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/control.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/lease.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/pool.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/reattach.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/session.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/takeover.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/telemetry.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/runtime/workers.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/__init__.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/backends/__init__.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/backends/drive.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/backends/filesystem.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/backends/google_auth.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/backends/layout.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/backends/objects.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/cas.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/handoff.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/pathdata.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/sendorder.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/store/volume.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/stubs.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/tools.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/__init__.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/agent.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/announce.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/link.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/linkd.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/linkmailbox.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/linkpump.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/linkupload.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/linkwebsocket.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/nat.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/pipeline.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/portmap.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/probe.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/quic.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/rendezvous.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/setup.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/sshopts.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify/transport/strategies.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/.gitignore +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/build.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify/Cargo.toml +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify/LICENSE +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify/README.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify/src/lib.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/Cargo.toml +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/examples/bench.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/acceptor.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/bin/letify-link.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/config.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/error.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/frame.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/handshake.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/hysteresis.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/identity.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/keys.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/lib.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/observe.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/paths.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/plan.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/policing.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/record.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/relay.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/rendezvous.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/replay.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/session.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/stream.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/stun.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/tcp.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/trace.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/src/udp.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/acceptor.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/api.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/common/mod.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/diag_sim.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/fairness.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/gauge.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/handshake.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/hysteresis.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/keepalive.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/mobile.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/nat.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/paths.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/qad.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/rekey.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/relay.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/relay_pairing.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/rendezvous.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/reorder.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/replay.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/resume.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/revoke.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/session.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/startup.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/subflows.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/trace.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/udp.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-link/tests/udp_bench.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-quic/Cargo.toml +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/letify-quic/src/main.rs +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-core/rust-toolchain.toml +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/.vscodeignore +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/LICENSE +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/README.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/media/icon.svg +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/src/cli.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/src/extension.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/src/history.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/src/model.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/src/poll.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/src/render.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/test/cli.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/test/manifest.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/test/model.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/test/regressions.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-ext/tsconfig.json +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/README.md +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/cloudflare.config.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/package-lock.json +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/package.json +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/src/auth.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/src/ed25519.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/src/handler.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/src/index.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/src/limiter.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/src/mailbox.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/src/objects.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/src/protocol.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/src/storage.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/test/auth.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/test/ed25519.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/test/helpers.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/test/interop.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/test/limiter.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/test/mailbox.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/test/objects.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/test/setup.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/test/worker.test.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/tsconfig.json +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify-signal/vitest.config.ts +0 -0
- {letify-2.11.4 → letify-2.12.0}/letify_providers.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/scripts/sync-main.sh +0 -0
- {letify-2.11.4 → letify-2.12.0}/scripts/version.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/fake_kaggle_adapter.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/fake_modal_adapter.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_cli.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_cli_output.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_colab_keepalive.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_config.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_core.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_data.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_data_in_place.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_data_streaming.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_declare.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_device.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_device_compile.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_distributed.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_drive_handoff.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_drive_store.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_editor_sessions.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_elice.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_frames.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_install.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_kaggle.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_kaggle_cookie.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_kaggle_link.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_link_exec.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_link_log.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_link_opt_in.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_link_upload.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_linkd.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_notebook.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_parallel_placement.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_paths.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_portmap.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_protocol.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_providers.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_punch_sockets.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_quic.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_remoting.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_render.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_run_control.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_run_reattach.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_run_takeover.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_runtime.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_shell_workers.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_ship.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_store.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_strategies.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_stubs.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_transport.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_tunnel_setup.py +0 -0
- {letify-2.11.4 → letify-2.12.0}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: letify
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.12.0
|
|
4
4
|
Summary: Declarations that become infrastructure.
|
|
5
5
|
Project-URL: Homepage, https://github.com/DarkPyonix/letify
|
|
6
6
|
Project-URL: Documentation, https://github.com/DarkPyonix/letify/tree/main/docs
|
|
@@ -329,7 +329,7 @@ A Kaggle declaration must say `host=letify.remote`. That kernel channel is the o
|
|
|
329
329
|
3. UDP hole punching with [Tailcat](https://github.com/tailscale/tailcat), then SSH over it
|
|
330
330
|
4. The provider's own path, such as `colab exec` and the Colab file API
|
|
331
331
|
|
|
332
|
-
A lower number wins unless it is far slower than the fastest one that connected. The winner is remembered per account and per network, so the next connection starts with it. A
|
|
332
|
+
A lower number wins unless it is far slower than the fastest one that connected. The winner is remembered per account and per network, so the next connection starts with it. A machine behind NAT needs letify installed and `letify agent serve` run on it once, so letify can reach it, with no SSH server and no Tailcat. Until 3.0 an account made by `letify client shell connect` still works through Tailcat and prints a notice that Tailcat is removed then. When that machine's SSH server is also published to the outside under another port, such as Docker's `-p 30501:8022`, run `letify client shell connect --ssh-port 8022 --public-address <host> --public-port 30501`: SSH straight to the address then dials port 30501, while hole punching and Tailcat keep using 8022. On an existing account, `letify login tunnel <alias> --address <host> --public-port 30501` sets the same. Colab and Elice never need that step: their provider layer creates and opens the machine through the provider's own API, so that layer takes the place of `letify client shell connect`. Modal is reached through its own API and is not part of this.
|
|
333
333
|
|
|
334
334
|
**Multiple accounts are first class.** Each configuration entry is one account, and entries of the same kind coexist. Two Colab accounts means twice the concurrent sessions.
|
|
335
335
|
|
|
@@ -489,7 +489,8 @@ def test_train_returns_a_loss():
|
|
|
489
489
|
```bash
|
|
490
490
|
letify login shell lab # declare an account, and reference it here
|
|
491
491
|
letify logout lab # take the account off this machine
|
|
492
|
-
letify
|
|
492
|
+
letify agent serve # run on a machine behind NAT, so letify can reach it
|
|
493
|
+
letify client shell connect # the Tailcat way of the same, removed in 3.0
|
|
493
494
|
letify setup tailcat # install tailcat or eci from its publisher ahead of time
|
|
494
495
|
letify providers # who is declared, storage, channel kind
|
|
495
496
|
letify devices # what each one offers
|
|
@@ -304,7 +304,7 @@ A Kaggle declaration must say `host=letify.remote`. That kernel channel is the o
|
|
|
304
304
|
3. UDP hole punching with [Tailcat](https://github.com/tailscale/tailcat), then SSH over it
|
|
305
305
|
4. The provider's own path, such as `colab exec` and the Colab file API
|
|
306
306
|
|
|
307
|
-
A lower number wins unless it is far slower than the fastest one that connected. The winner is remembered per account and per network, so the next connection starts with it. A
|
|
307
|
+
A lower number wins unless it is far slower than the fastest one that connected. The winner is remembered per account and per network, so the next connection starts with it. A machine behind NAT needs letify installed and `letify agent serve` run on it once, so letify can reach it, with no SSH server and no Tailcat. Until 3.0 an account made by `letify client shell connect` still works through Tailcat and prints a notice that Tailcat is removed then. When that machine's SSH server is also published to the outside under another port, such as Docker's `-p 30501:8022`, run `letify client shell connect --ssh-port 8022 --public-address <host> --public-port 30501`: SSH straight to the address then dials port 30501, while hole punching and Tailcat keep using 8022. On an existing account, `letify login tunnel <alias> --address <host> --public-port 30501` sets the same. Colab and Elice never need that step: their provider layer creates and opens the machine through the provider's own API, so that layer takes the place of `letify client shell connect`. Modal is reached through its own API and is not part of this.
|
|
308
308
|
|
|
309
309
|
**Multiple accounts are first class.** Each configuration entry is one account, and entries of the same kind coexist. Two Colab accounts means twice the concurrent sessions.
|
|
310
310
|
|
|
@@ -464,7 +464,8 @@ def test_train_returns_a_loss():
|
|
|
464
464
|
```bash
|
|
465
465
|
letify login shell lab # declare an account, and reference it here
|
|
466
466
|
letify logout lab # take the account off this machine
|
|
467
|
-
letify
|
|
467
|
+
letify agent serve # run on a machine behind NAT, so letify can reach it
|
|
468
|
+
letify client shell connect # the Tailcat way of the same, removed in 3.0
|
|
468
469
|
letify setup tailcat # install tailcat or eci from its publisher ahead of time
|
|
469
470
|
letify providers # who is declared, storage, channel kind
|
|
470
471
|
letify devices # what each one offers
|
|
@@ -18,7 +18,7 @@ This file is planning. The design is in [SPEC.md, letify-link](SPEC.md#letify-li
|
|
|
18
18
|
|---|---|---|
|
|
19
19
|
| M1 | Multi-socket TCP punch with spare sockets | Done in 2.10.0 |
|
|
20
20
|
| M2 | Session layer and path manager, with the hysteresis of the path manager and the head-of-line blocking measurement of many streams over TCP subflows against QUIC streams | Built on `feat/letify-link-spec`: the encrypted multiplexed session, TCP and UDP subflows and the path manager are in the `letify-link` crate. The head-of-line measurement is open |
|
|
21
|
-
| M3 | NAT type detection, port spraying, policing detection, Tailcat replacement | Built on the branch: NAT classification, the punch, the signalling client and the Cloudflare Worker in `letify-signal/`, and the agent with pairing. Measured only against fakes until `feat/link-signal-live`, which connects a tunnel account to a paired agent through the signalling service alone and measures it live on Kaggle and Colab (all paths were TCP punches, 4 of 4 in every run).
|
|
21
|
+
| M3 | NAT type detection, port spraying, policing detection, Tailcat replacement | Built on the branch: NAT classification, the punch, the signalling client and the Cloudflare Worker in `letify-signal/`, and the agent with pairing. Measured only against fakes until `feat/link-signal-live`, which connects a tunnel account to a paired agent through the signalling service alone and measures it live on Kaggle and Colab (all paths were TCP punches, 4 of 4 in every run). The tunnel over letify-link (B4) is done in 2.12: a Tunnel account logs in through `letify agent serve`, the login runs over the session, and the machine's sshd is reachable through a session stream ([#84](https://github.com/DarkPyonix/letify/pull/84), [#85](https://github.com/DarkPyonix/letify/pull/85)). A Tailcat account keeps working and is told it is removed in 3.0. Remaining: UDP punch to a cloud VM |
|
|
22
22
|
| M4 | The `letify-link` crate and sidecar wired into letify | Built on the branch as opt-in: the sidecar, the shell, Colab and Kaggle bootstrap, transfer streams, takeover and helper commands over the session. Ships in 2.11 behind `link = "letify-link"`. Default and Tailcat removal are 3.0 |
|
|
23
23
|
|
|
24
24
|
Each milestone is judged by its own experiment pull request. A spec change that the verdict rejects does not reach `develop`.
|
|
@@ -226,7 +226,7 @@ Provider (abstract)
|
|
|
226
226
|
├── Kaggle ephemeral, host="remote" only, account reached through a browser cookie
|
|
227
227
|
└── Shell ephemeral by default, reached through the connection pipeline
|
|
228
228
|
├── Colab session created by the Colab CLI, rendezvous over colab exec
|
|
229
|
-
├── Tunnel a machine behind NAT,
|
|
229
|
+
├── Tunnel a machine behind NAT, reached through letify agent serve (a Tailcat account works until 3.0)
|
|
230
230
|
└── Elice machine allocated through the Elice Cloud API, rendezvous over SSH to it
|
|
231
231
|
```
|
|
232
232
|
|
|
@@ -1926,15 +1926,16 @@ The public IP address is learned from the same STUN servers the punch uses. The
|
|
|
1926
1926
|
|
|
1927
1927
|
### Rendezvous <!-- id: rendezvous -->
|
|
1928
1928
|
|
|
1929
|
-
> Hole punching needs a way to start a program on the remote side and swap addresses. For Colab and Elice the provider layer fills that role; a
|
|
1929
|
+
> Hole punching needs a way to start a program on the remote side and swap addresses. For Colab and Elice the provider layer fills that role; a machine behind NAT runs `letify agent serve`, and until 3.0 a Tailcat account still uses `letify client shell connect`.
|
|
1930
1930
|
|
|
1931
1931
|
| Provider | Rendezvous |
|
|
1932
1932
|
|---|---|
|
|
1933
1933
|
| `Colab` | the provider layer: `colab new` creates the runtime and `colab exec` runs the remote half |
|
|
1934
1934
|
| `Elice` | the provider layer: `eci` launches or starts the machine, and the remote half runs over forward SSH to its public IP |
|
|
1935
|
-
| `Tunnel
|
|
1935
|
+
| `Tunnel` with an `agent` | `letify agent serve`, reached through the signalling service ([Agent and pairing](#link-agent)) |
|
|
1936
|
+
| `Tunnel` with `tailcat`, and a plain `Shell` behind NAT | the remote agent started by `letify client shell connect`, reached over Tailcat; removed in 3.0 |
|
|
1936
1937
|
|
|
1937
|
-
Colab and Elice never need
|
|
1938
|
+
Colab and Elice never need an agent. Their create and open step is what puts letify's remote half on the machine.
|
|
1938
1939
|
|
|
1939
1940
|
`letify client shell connect` is run once on a plain machine by its user. The agent needs letify installed on that machine. Before starting anything it checks two things, and each failure prints what to do and exits 1:
|
|
1940
1941
|
|
|
@@ -2228,7 +2229,7 @@ The library sends these message kinds over the trait, each as a kind byte follow
|
|
|
2228
2229
|
|
|
2229
2230
|
A `PunchOffer` with no mappings is a punch with no sockets and nothing else. It is not a relay request, and a receiver must not treat it as one: the relay meeting has its own kind.
|
|
2230
2231
|
|
|
2231
|
-
**Timing rule.** The initiator sets the start time to its clock plus a lead of 10 s (`DEFAULT_LEAD`) and the stop time to the start plus a window of 150 s (`DEFAULT_WINDOW`), the values of letify's Python TCP punch. The answer repeats the start time and reports the time at which the answerer stops. Both sides dial from the start time and stop at the earlier stop time, so neither spends a window the other has closed. The two clocks are assumed to agree within about a second.
|
|
2232
|
+
**Timing rule.** The initiator sets the start time to its clock plus a lead of 10 s (`DEFAULT_LEAD`) and the stop time to the start plus a window of 150 s (`DEFAULT_WINDOW`), the values of letify's Python TCP punch. The answer repeats the start time and reports the time at which the answerer stops. Both sides dial from the start time and stop at the earlier stop time, so neither spends a window the other has closed. The two clocks are assumed to agree within about a second. A responder that names its own start is described in [Sidecar interface](#link-sidecar), Offers.
|
|
2232
2233
|
|
|
2233
2234
|
letify implements the trait with its provider bootstraps (ssh, `colab exec`, the Kaggle API and the Drive mailbox), and these are its default rendezvous. The owner also operates a signalling service at `letify.darkpyonix.dev`, a Cloudflare Worker, which letify uses as an auxiliary rendezvous in three cases: reconnection and resumption after the client changed (a new network or a new machine), pairing of two runtimes under `host="distributed"` without the client, and nodes that have no bootstrap. The service carries only small messages, signed address records and punch timing, and never session data, so its cost is small. When the service is unreachable, letify uses the bootstrap. That changes only how addresses are exchanged, not the path that carries data, so it is not a fallback to a slower path. A relay never runs on the service: a Worker cannot accept UDP, and a relay is a node role as the [Relay](#link-relay) subsection says. Another program implements it with its own signalling. darkpyonix Ember, for example, would use a hub that publishes pkarr signed packets. The library holds no provider-specific code.
|
|
2234
2235
|
|
|
@@ -2297,9 +2298,12 @@ Hypothesis: one long-running process holding a list of paired node ids replaces
|
|
|
2297
2298
|
6. **Unpair.** `letify agent unpair <node>` removes the node from `paired.json`, where `<node>` is the full id or a unique prefix of at least 8 characters, and `letify agent paired` lists the nodes with label and time. A running agent that sees the change ends that node's conversation, killing its shim even after hand-over, and answers its later messages with nothing.
|
|
2298
2299
|
7. **The URL.** The service URL is, in order: `--signal`, the environment variable `LETIFY_SIGNAL_URL`, `signal` in `~/.letify/agent/config.toml`, then `https://letify.darkpyonix.dev`. The token carries the URL the agent used, and the user side uses the token's URL, so the two sides cannot disagree. A plain `http://` URL is accepted only for a loopback host.
|
|
2299
2300
|
8. **Login.** `letify login tunnel <alias> --connect <token>` dispatches on the prefix of the token: `letify-agent2:` takes this path, anything else takes the Tailcat path. This path needs no ssh and no Tailcat. It makes the account's node key `~/.letify/accounts/<alias>/link.key` (the key `connect_over` uses for the same account), pairs as item 3 says and writes `kind = "tunnel"`, `agent = "<agent node id>"` and `signal = "<URL>"`. A token past its `exp` is refused before anything is sent.
|
|
2300
|
-
9. **Commands.** `letify agent` runs on the address-less machine and builds no Launcher, like `letify client`. It is a command of its own and not a flag of `letify client shell connect`, because that command is the Tailcat agent with an ssh server
|
|
2301
|
+
9. **Commands.** `letify agent` runs on the address-less machine and builds no Launcher, like `letify client`. It is a command of its own and not a flag of `letify client shell connect`, because that command is the Tailcat agent with an ssh server. From 2.12 `letify agent serve` is the documented tunnel setup, and `letify client shell connect` prints, after its login command, one dim line: `Tailcat is removed in 3.0. Run 'letify agent serve' on this machine instead.`
|
|
2301
2302
|
10. **Dependencies.** The agent is the standard library and the `letify-link` binary. It adds no package.
|
|
2302
2303
|
11. **Connect.** A `tunnel` account with an `agent` field is reached through the agent, with no ssh and no Tailcat. The account is a letify-link account without a `link` option: `link = "ssh"` on it is refused by name, because there is no ssh server to reach. It has no address, so `Tunnel.address` is `None` and no strategy is raced. `Tunnel.link()` returns the session's measurements with no ssh command, as `Colab.link()` does. `connect_link` calls `linkchannel.connect_signal`, which opens the sidecar of the account's `link.key`, builds a `SignalClient` for the account's `signal` URL and a `SignalBootstrap` for the node `agent`, and calls `connect_over` with no address, `punch=True`, the channel named `the signalling service` and no binary preparation, because the agent holds the binary of its own machine. The ping of `SignalBootstrap.start` is the bootstrap round trip, so `lead_ms` and the shim wait follow the rules of [Sidecar interface](#link-sidecar) item 8. A failure raises `ProviderUnavailable` with the reason and falls back to nothing.
|
|
2304
|
+
12. **The ssh target.** `letify agent serve --ssh-target HOST:PORT`, or `ssh_target` in `~/.letify/agent/config.toml`, sets the sshd that the ssh stream of [Sidecar interface](#link-sidecar) item 11 reaches on this machine. It defaults to `127.0.0.1:22`. The agent has no ssh server of its own, so the stream is useful only on a machine that runs one; without one the stream is closed and nothing else is affected.
|
|
2305
|
+
13. **What needed ssh.** Every step of the Tailcat login that used ssh has a session equivalent on an agent account: the workspace check and the device query of `letify login tunnel` run over the `exec` stream (Tunnel login section), `letify login tunnel <alias> --detect-devices` asks an agent account again over the same stream and then follows [Recording devices at login](#login-records-devices) item 7, and `Tunnel.check`, the device listing and the worker listing already run over it. The key install and key confirmation have no equivalent and are not done, because the session authenticates with node keys. An agent account's `--detect-devices` is no longer refused for having no address.
|
|
2306
|
+
14. **The Tailcat notice.** A `tunnel` account with `tailcat` and no `agent` prints once per process, when its link is first chosen, the line `<alias> reaches its machine through Tailcat, which is removed in 3.0. To migrate it, run 'letify agent serve' on the machine, then 'letify login tunnel <alias> --connect letify-agent2:<token>' with the token it prints.` It goes through the account's announce setting like every connection line, so `announce = false` silences it. The account keeps working unchanged. A second Tailcat account in the same process prints nothing more. Tailcat code is removed in 3.0, not before.
|
|
2303
2307
|
|
|
2304
2308
|
#### NAT traversal <!-- id: link-nat -->
|
|
2305
2309
|
|
|
@@ -2378,7 +2382,7 @@ The sidecar is a binary named `letify-link`, built for each wheel and installed
|
|
|
2378
2382
|
|---|---|---|
|
|
2379
2383
|
| `listen` | `allow`: node ids that may start a session; `bind`: optional TCP address to listen on | `listener`: integer; `addr`: the bound address when `bind` was given |
|
|
2380
2384
|
| `open_session` | `peer`: node id; `candidates`: see below; `config`: optional `keepalive_ms`, `resume_window_s`, `handshake_timeout_ms`, `start_timeout_ms` (how long to wait for the first handshake, default 60000) | `session`: integer; `peer` |
|
|
2381
|
-
| `punch` | `peer`: node id; `role`: `initiator` or `responder`; `sockets`: TCP sockets, 0 to 8 (default 4); `udp`: probing UDP sockets, 0 to 8 (default 0), of which a punch yields at most one UDP path; `observers`: where the mappings come from, see item 3; `public_ip`: optional address reported as the mapping of every socket when `observers` is absent (default `127.0.0.1`); `police`: optional `{"floor_bps", "burst_ms"}`, the initiator's policing check; `lead_ms`, `window_ms`: optional; `listener`: required for the responder | initiator: `punched`: names usable as candidates, `policed`: names of paths that were dropped, `nat`: this side's classification, `peer_nat`: the other side's, `mapped`: `{"tcp": [...], "udp": [...]}`, the addresses this side offered, `report`: the one-line account of [NAT traversal](#link-nat) item 8; responder: `sockets`: how many paths were punched, `nat`, `peer_nat`, `mapped` as for the initiator |
|
|
2385
|
+
| `punch` | `peer`: node id; `role`: `initiator` or `responder`; `sockets`: TCP sockets, 0 to 8 (default 4); `udp`: probing UDP sockets, 0 to 8 (default 0), of which a punch yields at most one UDP path; `observers`: where the mappings come from, see item 3; `public_ip`: optional address reported as the mapping of every socket when `observers` is absent (default `127.0.0.1`); `police`: optional `{"floor_bps", "burst_ms"}`, the initiator's policing check; `lead_ms`, `window_ms`: optional; `answer_margin_ms`: optional, responder only, see Offers; `listener`: required for the responder | initiator: `punched`: names usable as candidates, `policed`: names of paths that were dropped, `nat`: this side's classification, `peer_nat`: the other side's, `mapped`: `{"tcp": [...], "udp": [...]}`, the addresses this side offered, `report`: the one-line account of [NAT traversal](#link-nat) item 8; responder: `sockets`: how many paths were punched, `nat`, `peer_nat`, `mapped` as for the initiator |
|
|
2382
2386
|
| `rendezvous_message` | `from`: node id; `message`: hex | none besides `ok` |
|
|
2383
2387
|
| `paths` | `session` | `paths`: `[{"id","kind","sent_bytes","received_bytes","acked_bytes","rtt_ms","srtt_ms","window","probe_rate"}]`, where `kind` is `"tcp"`, `"udp"` or `"relay"`, the transport kind of the candidate the subflow came from, and null on a session the other side started |
|
|
2384
2388
|
| `open_stream` | `session`; `priority`: optional, `interactive` (default) or `bulk`, as Session item 7 says | `stream`: integer; `socket`: local stream socket; `secret`: present only for a `tcp:` socket |
|
|
@@ -2404,6 +2408,7 @@ The sidecar is a binary named `letify-link`, built for each wheel and installed
|
|
|
2404
2408
|
2. **Streams.** `open_stream` binds a local stream socket, replies with its address and waits up to 30 s for Python to connect to it. The address is `unix:<path>` or `tcp:127.0.0.1:<port>`. A Unix socket is `<private>/s<N>` with mode 0600, where `<private>` is a directory with mode 0700 that the sidecar creates inside `stream-dir` (which defaults to the directory of the control socket) and removes when it exits, and `N` counts from 1; on the loopback fallback it is a port. After the connection the sidecar copies bytes both ways between the local socket and the session stream. End of file on one side ends that direction of the other with a shutdown, and the sidecar removes the socket file once the connection is made. An incoming stream is announced with `stream_incoming`, which carries its own local socket and is connected the same way. A stream that nobody connects to within 30 s is closed. Python never sees a path. A `tcp:` stream socket is reachable by every local process, so it carries a `secret`: 64 lowercase hex characters from 32 random bytes of the operating system, new for each stream, in the `open_stream` reply and the `stream_incoming` event. The first 32 bytes a client sends on the socket must be those bytes. The sidecar compares them in constant time, closes a connection that sends other bytes or none within 5 s, and keeps waiting for the right one until the 30 s are over. Connections are checked concurrently, so a silent stray connection delays no other. The secret is required on every platform; a `unix:` socket has none, because its mode 0600 limits it to the owner.
|
|
2405
2409
|
3. **Rendezvous.** In the sidecar, `ControlRendezvous` implements the `Rendezvous` trait: `send` emits `rendezvous_out` and `recv` returns what `rendezvous_message` supplied. `rendezvous_out` carries the message and the node it is for, and Python delivers it through whichever bootstrap reaches that node. `punch` is the one operation that uses it.
|
|
2406
2410
|
- **Offers.** The initiator binds `sockets` TCP sockets and `udp` UDP sockets, works out their mappings, and sends one `PunchOffer` for TCP and one for UDP (each only when its count is above 0) with the same `start_at_ms` = now + `lead_ms` (default 2000) and `until_ms` = `start_at_ms` + `window_ms` (default 20000). Each offer carries the mappings, the sender's NAT type and a flag that says a policing check follows on every punched path. The responder takes the first offer and any other that arrives within 400 ms, answers each protocol it also has sockets for with its own mappings and NAT type, and ignores the others. Both then punch TCP and UDP at the same time with the earlier `until_ms`, and the punch succeeds when one protocol has at least one path. It fails with kind `infrastructure` only when none has.
|
|
2411
|
+
- **Answer start.** A responder whose request has `answer_margin_ms` names the start of the punch itself. It computes `now + answer_margin_ms` once, at the time it answers, and answers every protocol with `start_at_ms` = the earlier of that and the offered `start_at_ms`, and `until_ms` = that start plus the offered window (`until_ms` - `start_at_ms` of the offer). The initiator adopts the start of the answer when it is earlier than its own, and the earlier of the two `until_ms`. Both sides then dial from the answered start, so the wait for the offered `start_at_ms` ends when the answer is received, not at `lead_ms`. A responder with no `answer_margin_ms` repeats the offered start and stop times as before, so an older responder works with a newer initiator. A newer responder works with an older initiator because that initiator never sends `answer_margin_ms`. A start in the past is not an error: the side that holds the answer dials at once, and the other side retries until `until_ms`. The two clocks are assumed to agree within about a second, as before, because the start is an absolute unix time.
|
|
2407
2412
|
- **Mappings.** With `observers` absent, the mappings are the bound addresses with `public_ip` in place of the local IP, which is exact on a network without a NAT. With `observers` set, the sidecar asks address observers (the `AddressObserver` list of this crate) from the first UDP socket, one after another, and classifies the NAT as [Rendezvous](#rendezvous) says. `observers` is `"default"`, which means the environment variable `LETIFY_LINK_STUN` (comma separated `host:port`, used by tests) and otherwise the default STUN servers, or a list of `host:port` STUN servers. Fewer than three answers fail the punch with kind `infrastructure` and the count that answered: the sidecar does not guess a mapping. Each UDP socket's mapping is what the first observer reports for it, and the first socket's is the last mapping of the classification. A TCP socket cannot be observed over UDP, so its mapping is the public IP of the UDP classification with the socket's own port. When the NAT is symmetric with a step other than 0, the offered port of TCP socket `i` is the first UDP mapping advanced by `step * (i + 1)`, so the peer's prediction aims at the port the NAT is expected to hand out next.
|
|
2408
2413
|
- **UDP paths.** The UDP punch of [Rendezvous](#rendezvous) sends probes from the UDP sockets to the peer's mappings. The destinations are the peer's mapping when its NAT is not symmetric, and its predicted ports (`predicted_destinations`, 16 ports) when it is symmetric with a step. When the peer is symmetric with no step, this side sprays 256 random ports on the peer's IP, and when this side is also symmetric with no step it binds 256 sockets as well (the many-port birthday attempt). The initiator's socket that gets the first answer carries a QUIC connection to the address that answered, and the responder accepts it on whichever of its probing sockets the handshake reaches, as NAT traversal item 4 says and UDP paths, Session item 6, describes. The result is a candidate of kind `Udp`, one per punch.
|
|
2409
2414
|
- **Policing.** When the initiator's offer has the policing flag, each punched path is checked before anything else uses it: the initiator runs the check of Policing detection as the client with the `floor_bps` and `burst_ms` of `police`, and the responder runs it as the server and sees a dropped path as a closed one. A path with a `Policed` verdict, or one on which the check fails, is closed, emits `path_policed` on the initiator, and is not returned or handed to the acceptor. The initiator's reply lists the dropped names in `policed`. When every path is dropped, the punch fails with kind `infrastructure` and a message that names the policing.
|
|
@@ -2455,6 +2460,7 @@ The sidecar is a binary named `letify-link`, built for each wheel and installed
|
|
|
2455
2460
|
- **The mailbox.** `letify/transport/linkpump.py`, a standard-library program, is started once through the command channel as a detached process. It starts the shim of item 7 with pipes, appends every complete line the shim prints to an outbox file, and feeds every line appended to an inbox file to the shim's standard input, so the shim is unchanged. The local side then loops on the command channel: each call appends the pending lines to the inbox, waits up to 0.5 s for the outbox to grow past the byte offset the caller holds, and returns the new lines and the new offset. Each call is a poll and a send in one, so nothing is lost when a call is slow. `letify/transport/linkchannel.py` defines `Bootstrap`, with `send_line`, `recv_line`, `stderr_text` and `close`, and `connect` takes a function that returns one. An ssh command is one implementation (`PopenBootstrap`) and the mailbox is the other (`MailboxBootstrap`), so the rest of the connect is the same code for both. If the pump or the shim exits, the outbox ends with an `eof` line holding the tail of the shim's standard error, and the connect fails with that tail.
|
|
2456
2461
|
- **Timing from the measured round trip.** After the pump starts, the local side makes 2 calls that wait for nothing and takes the longer as the bootstrap round trip `rtt`. A message from one sidecar reaches the other in at most one `rtt` (the call that carries it is in flight for at most `rtt` and the next one carries it), so a punch offer and its answer need at most 2 `rtt`. The rules are:
|
|
2457
2462
|
- `lead_ms = max(2000, ceil(3 * rtt_ms))`, passed to the sidecar's `punch` in place of its default of 2000, so the offer is at the responder, and the answer back, before the start time.
|
|
2463
|
+
- `answer_margin_ms = max(500, ceil(rtt_ms))`, passed to the responder's `punch` through the shim (and through the agent's `punch` command), so the responder names its own start as the Answer start bullet of this section says. The answer needs at most one `rtt` to reach the initiator, so the initiator holds the start before it is due, and the wait after the answer arrives is at most the margin less the time the answer took. `lead_ms` stays the initiator's bound on how long it waits for the answer. A shim of an older letify ignores the field and the punch starts at `lead_ms` as before.
|
|
2458
2464
|
- The shim gets `SHIM_TIMEOUT` (60 s) plus 10 `rtt` to print its ready line.
|
|
2459
2465
|
- The window is `window_ms` 20000 for the first attempt.
|
|
2460
2466
|
- **One retry.** When the first punch yields no usable path, the local side measures `rtt` again, and punches once more with `lead_ms` from the new `rtt` and `window_ms` 60000 (3 times the first), the birthday window of [Rendezvous](#rendezvous) for a symmetric NAT. It sends the shim a new `punch` command with the same two values. When the second attempt also yields no path, the connect fails with `<alias> has no address and no punched path connected` followed by both attempts, each as `attempt <n> (lead <lead> ms, window <window> ms): <reason>`. There is never a third attempt and never a path other than a punched one. An ssh bootstrap (item 7) keeps one attempt with the sidecar's default lead and window, because its round trip is not a rendezvous cost.
|
|
@@ -2463,6 +2469,11 @@ The sidecar is a binary named `letify-link`, built for each wheel and installed
|
|
|
2463
2469
|
- **After the hand-over.** The mailbox ends once the shim says `handed_over`. The command channel keeps serving what it served before (a Colab keep-alive, a Kaggle kernel bridge), and `Colab.link()` and `Kaggle.link()` return the session's measurements with no ssh command: asking such a link for an ssh command raises `RuntimeFailure`.
|
|
2464
2470
|
9. **Bootstrap over the signalling service.** `letify/transport/linksignal.py` carries the `Bootstrap` of item 7 over the mailbox of [Signalling service](#link-signal). It uses the sidecar's `sign` and `verify` and adds no Python dependency. `SignalClient(daemon, base_url)` signs and sends `POST /send/<to>` and long polls `GET /recv/<own id>`, with `http.client` from the standard library on kept connections (Signalling service item 1, Connections). `SignalBootstrap(client, peer)` implements `send_line`, `recv_line`, `stderr_text`, `close` and `rtt_s`: each line is put in a signed envelope for the node `peer`, and each envelope received is verified as the Signalling service trust model lists, so a line that arrives unsigned, wrongly signed, stale, replayed or for another node is dropped and counted in `stderr_text`. A line whose envelope would pass 4096 bytes raises `OSError` naming the size and the cap, and is not split. The first line `connect_over` writes (the config line) is reduced to the lean config of Signalling service item 7. `SignalAgent` is the program on the address-less machine: it holds its own configuration (the `letify-link` binary, the Python, the paired node ids), reads its mailbox, runs `linkshim.py` for a paired node that sends a valid config line, and relays the shim's lines back in envelopes. The mailbox identity is the node key that signs the requests and envelopes of each side. On the local side it is the key file `connect_over` uses for its own sidecar, so the envelope's `from` is the node id the shim allows. The shim's sidecar has a throwaway key of its own, and its node id reaches the local side in the agent's signed `ready` line, which is how the local side learns whom to open the session with. A start that fails (the agent does not answer a ping in 30 s, the service is down) raises `ProviderUnavailable` with the reason from `connect_over`. Pairing and the persistent agent process are in [Agent and pairing](#link-agent); `SignalAgent` serves one paired node and its installation is not part of this item.
|
|
2465
2471
|
10. **Trace.** The sidecar writes a diagnostic trace only when asked. `LETIFY_LINK_TRACE=PATH` makes it append one JSON object per line to `PATH` for every open session, every `LETIFY_LINK_TRACE_MS` milliseconds (default 1000, at least 50). A binary built with `LETIFY_LINK_TRACE_DEFAULT=PATH` in its build environment uses `PATH` when `LETIFY_LINK_TRACE` is unset, which is how a binary that a bootstrap uploads to a remote machine is traced without an environment there. Without either the sidecar writes nothing and spawns no task. A binary built with `LETIFY_LINK_TRACE_MS_DEFAULT` does the same for the interval. A line holds `t_ms` (since the sidecar started), `unix_ms` (the wall clock), `session`, `cpu_ms` (user plus system time of the process, from `/proc/self/stat`, absent where that file is), the session's `unacked_bytes`, `reinjected` and `reorder_peak`, and `subflows`, one object per subflow with `id`, `sent`, `received`, `acked`, `inflight`, `window`, `bulk_cap`, `srtt_ms`, `delivery_rate` and, for a UDP path, `cwnd`, `lost` and `sent_packets`. Each subflow object also holds `kind` (`"tcp"`, `"udp"` or `"relay"`, from the path manager's `PathKinds` when the session has one, otherwise `"udp"` for a subflow that has a congestion gauge and `"tcp"` for one that has none), `gauged` (true when the subflow's transport reports congestion statistics, so `cwnd` and `lost` are absent exactly when `gauged` is false or no reading was taken yet), `window_limit` (the subflow's current window limit in bytes, between the configured window and `subflow_window_ceiling`) and `min_rtt_ms` (the lowest write to subflow ack time, `null` before the first). A UDP path gets a gauge whether the session received it directly or behind a `BoxTransport`, which is the form a punched candidate takes. The trace also writes an event line, which has `event` instead of `subflows`, when a subflow closes (`"event": "subflow_closed"` with `subflow`, `kind` and `reason`) and when the session fails (`"event": "session_failed"` with `reason`, the text `fail()` recorded). The reason of a closed subflow is `dead timeout: ...` when no record arrived for three keepalive intervals, `transport error: ...` when a read or write on the transport failed, `closed by caller` when `close_subflow` or `resume_now` dropped it (the path manager does so when it moves), and `session failed` when the session failed. An event line is written at the next sampling tick after the event and once only. The trace changes no behaviour of the session.
|
|
2472
|
+
11. **The ssh stream.** A session reaches the sshd of the shim's machine by forwarding streams to a local port, with no Tailcat and no ssh bootstrap. The experiment is the branch `feat/agent-ssh-stream`.
|
|
2473
|
+
- **The stream.** `{"kind":"ssh","token":"<hex>"}` asks the shim to open one TCP connection to its ssh target and copy bytes both ways between that connection and the stream, with no process started and no byte of the stream consumed beyond the header line. End of file on one side shuts down that direction of the other, and the two ends close when both directions have ended. The header names no host and no port, so the local side cannot choose the target.
|
|
2474
|
+
- **The target.** The ssh target is `host:port` and is the shim's own configuration, never a field of the stream or of the config line. It defaults to `127.0.0.1:22`. A shim started by `letify agent serve` takes it, in order, from `--ssh-target HOST:PORT`, from `ssh_target` in `~/.letify/agent/config.toml`, then the default; the agent passes it into the shim configuration of every conversation as it does the `binary`. A value that is not `host:port` with a port from 1 to 65535 is refused by `letify agent serve` before it starts.
|
|
2475
|
+
- **The local forward.** `LinkRemote.forward_ssh(port=0)` binds a TCP listener on `127.0.0.1` only, on `port` or on a free port when `port` is 0, and returns an `SshForward` with `port` and `close()`. Each accepted connection opens one stream of the session with priority `interactive`, sends the header above and copies bytes both ways as the stream does. A connection whose stream cannot be opened is closed at once and nothing else is affected. `SshForward.close()` closes the listener and every connection it carries, and `LinkRemote.close()` closes the forwards it made. `Tunnel.ssh_forward()` on an agent account returns the forward of the account's session, so `ssh -p <port> <user>@127.0.0.1` reaches the agent machine's sshd.
|
|
2476
|
+
- **Errors.** When the shim cannot connect to the target within 10 s, it closes the stream without sending a byte and logs `ssh target <host:port> refused: <reason>` to its standard error, and the local connection ends with end of file before any banner. A forward is never opened to another machine and never falls back to a direct connection. A session that is lost pauses the copies as [Session](#link-session) item 5 says and ends them when the session ends.
|
|
2466
2477
|
|
|
2467
2478
|
### Reverse SSH <!-- id: reverse-ssh -->
|
|
2468
2479
|
|
|
@@ -2757,7 +2768,19 @@ After the sign in succeeds, the Colab login records `key`, the SSH private key w
|
|
|
2757
2768
|
|
|
2758
2769
|
The account is written with `kind = "elice"`, `zone_id`, `key`, `machine_id` and `price_type` when chosen, and `endpoint` only when it is not the default.
|
|
2759
2770
|
|
|
2760
|
-
`letify login tunnel <alias> --connect <token>` declares a machine behind NAT
|
|
2771
|
+
`letify login tunnel <alias> --connect <token>` declares a machine behind NAT. The token is the one `letify agent serve` prints (prefix `letify-agent2:`), and that is the setup letify documents. A token from `letify client shell connect` still declares a Tailcat account until 3.0. Without `--connect`, a terminal is asked `Token printed by 'letify agent serve' or 'letify client shell connect': `, and `--no-input` refuses. The prefix decides the path. A failure at any step writes nothing to either file and raises `LoginError` whose message starts with `tunnel login failed at <step>: `.
|
|
2772
|
+
|
|
2773
|
+
The agent path runs these steps and uses no ssh key, no Tailcat and no ssh server:
|
|
2774
|
+
|
|
2775
|
+
1. `token`: the token is decoded and its expiry checked, as [Agent and pairing](#link-agent) item 8 says.
|
|
2776
|
+
2. `pairing`: the node is paired as item 3 says.
|
|
2777
|
+
3. `session`: one letify-link session to the agent is opened with the account just paired, under the [Link floor](#link-floor). A session that cannot be opened fails the login, because every later step and every call needs it.
|
|
2778
|
+
4. `workspace`: the workspace root is chosen as for `shell` and checked over the session's `exec` stream. `exec` runs as the agent's user, so it needs no key.
|
|
2779
|
+
5. `devices`: the GPUs are recorded as Recording devices at login describes, with `nvidia-smi` run over the same `exec` stream. A failure here never fails the login.
|
|
2780
|
+
|
|
2781
|
+
The session is closed when the login ends. The account is written with `kind = "tunnel"`, `agent`, `signal`, `workspace` when it is not the default, and the `devices` table. It has no `address`, `user`, `port` or `key`. The ssh server of the agent machine is reached only when the user asks for it, through `Tunnel.ssh_forward()` ([Sidecar interface](#link-sidecar) item 11), and nothing in letify needs it.
|
|
2782
|
+
|
|
2783
|
+
The Tailcat path is for an account that already exists and for a machine that cannot run the agent. A Tailcat token is accepted, and the login prints one line saying that Tailcat is removed in 3.0 and that `letify agent serve` replaces it. Its steps are these, and every one runs over Tailcat:
|
|
2761
2784
|
|
|
2762
2785
|
1. `tailcat`: `tailcat` must be found by the lookup of Installing external tools, and every SSH command runs it by the path found. Otherwise it is installed automatically, and when automatic install is turned off the message is the same install instructions `letify client shell connect` prints, for this machine's operating system and architecture.
|
|
2763
2786
|
2. `token`: the token is decoded. A token that is not the base64 JSON described under Rendezvous, or that lacks `tailcat` or `tailcat_port`, is refused.
|
|
@@ -2766,7 +2789,7 @@ The account is written with `kind = "elice"`, `zone_id`, `key`, `machine_id` and
|
|
|
2766
2789
|
5. `workspace`: the workspace root is chosen and checked as for `shell`, over the same `ProxyCommand`.
|
|
2767
2790
|
6. `devices`: the GPUs are recorded as Recording devices at login describes, over the same `ProxyCommand`.
|
|
2768
2791
|
|
|
2769
|
-
The account is written with `kind = "tunnel"`, `tailcat`, `tailcat_port`, `user`, `port` and `key` from the token and the options. It has no `address` unless the token or `--address` gives one, and `public_port` is written when the token or `--public-port` gives it. A value in the token wins over the option.
|
|
2792
|
+
The account is written with `kind = "tunnel"`, `tailcat`, `tailcat_port`, `user`, `port` and `key` from the token and the options. It has no `address` unless the token or `--address` gives one, and `public_port` is written when the token or `--public-port` gives it. A value in the token wins over the option.
|
|
2770
2793
|
|
|
2771
2794
|
`letify login kaggle <alias>` declares a Kaggle account from the browser session cookie of a logged-in kaggle.com tab. The cookie is `--cookie`, a file it names, or with a terminal it is asked for with hidden input as `Kaggle cookie (from a logged-in kaggle.com tab): `, and `--no-input` without `--cookie` refuses. It is checked for shape (it must carry `ka_sessionid`, `CLIENT-TOKEN` and `XSRF-TOKEN`) and expiry (from the `CLIENT-TOKEN` `exp` claim) before any network call, then proven with `users.UsersService/GetCurrentUser`, which returns the account only for a real session. Nothing is written until the check passes. The cookie is stored at `~/.letify/accounts/<alias>/cookie` with mode 0600, and it never appears in `config.toml` or in output.
|
|
2772
2795
|
|
|
@@ -2825,7 +2848,7 @@ One other approach is not the default. `sshpass` feeds a stored password to each
|
|
|
2825
2848
|
| Kind | Written to the home file | Credential |
|
|
2826
2849
|
|---|---|---|
|
|
2827
2850
|
| `shell` | address, user, port, key path, `workspace` when it is not the default, and the `devices` table the machine reported | an SSH key, installed by `login`; no password stored |
|
|
2828
|
-
| `tunnel` | `
|
|
2851
|
+
| `tunnel` | `agent` and `signal` from the token `letify agent serve` printed, `workspace` when it is not the default, and the `devices` table; or, for a Tailcat account until 3.0, `tailcat`, `tailcat_port`, user, port and key path from the token `letify client shell connect` printed, with `address` and `public_port` only when the token or the options give them | an agent account: the account's node key `link.key`, paired with the agent. A Tailcat account: an SSH key, installed by `login` over Tailcat; no password stored |
|
|
2829
2852
|
| `elice` | endpoint when not the default, zone, key path, and `machine_id`, `price_type` and `workspace` when given | access token in `~/.letify/accounts/<alias>/access_token`; the generated machine password in `machine_password` once letify launches a machine |
|
|
2830
2853
|
| `colab` | account email, `workspace` when given | the Colab CLI's token, written by its own sign in under `~/.letify/accounts/<alias>/` |
|
|
2831
2854
|
| `modal` | `profile` and `workspace`, each when given | Modal's token, written by `modal token new` to `~/.letify/accounts/<alias>/modal.toml` |
|
|
@@ -3217,7 +3240,7 @@ Connection decision lines stay on standard error as `letify: <message>`, with th
|
|
|
3217
3240
|
| `logout` | `✓ <alias> removed from <home>`, then the note about the project reference, dim |
|
|
3218
3241
|
| `stubs` | `✓ <path written>` |
|
|
3219
3242
|
| `setup <tool>` | `✓ <tool> <version> at <path>`, or with `--where` the `cache`, `link`, `PATH` and `uses` lines, as Installing external tools describes |
|
|
3220
|
-
| `client shell connect` | `On your own machine, run:` bold, the login command plain so it can be copied, and the notes dim |
|
|
3243
|
+
| `client shell connect` | `On your own machine, run:` bold, the login command plain so it can be copied, and the notes dim, ending with the line that says Tailcat is removed in 3.0 |
|
|
3221
3244
|
|
|
3222
3245
|
A runtime block in `status` is:
|
|
3223
3246
|
|
|
@@ -156,31 +156,51 @@ In a script, `--no-input` records every card, and `--indices A100=0-1` (repeatab
|
|
|
156
156
|
|
|
157
157
|
## 🕳️ Tunnel, for a machine behind NAT
|
|
158
158
|
|
|
159
|
-
For a machine that cannot accept an inbound connection. letify reaches it
|
|
159
|
+
For a machine that cannot accept an inbound connection. letify reaches it through a small agent you run on the machine, so the machine needs no SSH server, no open port and no extra program. Setup is one command on each machine, and the machine needs letify. [The agent guide](09-agent.md) has the full walk-through.
|
|
160
160
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
**1. On the remote machine**, start the agent:
|
|
161
|
+
**1. On the machine**, start the agent:
|
|
164
162
|
|
|
165
163
|
```bash
|
|
166
|
-
letify
|
|
164
|
+
letify agent serve
|
|
167
165
|
```
|
|
168
166
|
|
|
169
|
-
|
|
167
|
+
It prints one command to run on your own machine, with a token that expires in 15 minutes and works once:
|
|
170
168
|
|
|
171
169
|
```
|
|
172
|
-
letify login tunnel home_box --connect
|
|
170
|
+
letify login tunnel home_box --connect letify-agent2:eyJ2IjoyLCJhZ2Vu...
|
|
173
171
|
```
|
|
174
172
|
|
|
175
|
-
Keep the agent running, for example inside `tmux`. It
|
|
173
|
+
Keep the agent running, for example inside `tmux`. It keeps serving after a restart of your laptop, and its paired list survives its own restart.
|
|
176
174
|
|
|
177
175
|
**2. On your own machine**, run the printed command:
|
|
178
176
|
|
|
179
177
|
```bash
|
|
180
|
-
letify login tunnel home_box --connect
|
|
178
|
+
letify login tunnel home_box --connect letify-agent2:eyJ2IjoyLCJhZ2Vu...
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
It pairs this machine with the agent, opens one session to it, checks the workspace root and records the GPUs, all over that session. No SSH key is installed and no SSH server is needed. Then `letify check home_box` confirms the machine answers. The account in `~/.letify/config.toml` looks like this, with no address:
|
|
182
|
+
|
|
183
|
+
```toml
|
|
184
|
+
[home_box]
|
|
185
|
+
kind = "tunnel"
|
|
186
|
+
agent = "3f9c..."
|
|
187
|
+
signal = "https://letify.darkpyonix.dev"
|
|
181
188
|
```
|
|
182
189
|
|
|
183
|
-
|
|
190
|
+
`letify login tunnel home_box --detect-devices` asks the machine for its GPUs again over the same session. If you do want plain `ssh` to the machine, `Tunnel.ssh_forward()` opens a loopback port that reaches the agent machine's SSH server, as [the agent guide](09-agent.md) describes.
|
|
191
|
+
|
|
192
|
+
### An existing Tailcat account
|
|
193
|
+
|
|
194
|
+
A Tunnel account made by `letify client shell connect` keeps working in this release, and it prints once per process that Tailcat is removed in 3.0. To migrate it, run `letify agent serve` on the machine and run `letify login tunnel home_box --connect letify-agent2:...` with the token it prints. Use `--replace` to renew an account that is already declared. The Tailcat setup below stays available until 3.0.
|
|
195
|
+
|
|
196
|
+
<details>
|
|
197
|
+
<summary>The Tailcat setup, until 3.0</summary>
|
|
198
|
+
|
|
199
|
+
letify reaches the machine over [Tailcat](https://github.com/tailscale/tailcat), and SSH does the work. Both machines need `tailcat`, and the remote one needs letify and an SSH server.
|
|
200
|
+
|
|
201
|
+
On the remote machine, run `letify client shell connect --name home_box`. If `tailcat` is missing, the command installs it as [Installing tailcat and eci](#installing-tailcat-and-eci) describes. If automatic install is turned off, or the SSH server is missing, it prints the exact install steps for that machine and exits. Otherwise it prints one command to run on your own machine, `letify login tunnel home_box --connect eyJ0YWlsY2F0Ijoi...`. Keep the agent running, because it carries every connection and a restart gives it a new address.
|
|
202
|
+
|
|
203
|
+
On your own machine, the login installs your SSH key over Tailcat (you type the remote password once), confirms the key, checks the workspace root and records the GPUs, as `letify login shell` does. The account looks like this:
|
|
184
204
|
|
|
185
205
|
```toml
|
|
186
206
|
[home_box]
|
|
@@ -192,6 +212,8 @@ port = 22
|
|
|
192
212
|
key = "~/.ssh/id_letify"
|
|
193
213
|
```
|
|
194
214
|
|
|
215
|
+
</details>
|
|
216
|
+
|
|
195
217
|
Try the simpler paths first. A direct address, then a jump host, then this. Campus machines often allow one of the first two. Details and measurements are in [docs/NETWORK.md](../NETWORK.md).
|
|
196
218
|
|
|
197
219
|
## ☁️ Modal
|
|
@@ -90,7 +90,9 @@ letify creates this account's key `~/.letify/accounts/lab_box/link.key`, sends a
|
|
|
90
90
|
|
|
91
91
|
On success the account is written with `kind = "tunnel"`, the agent's node id and the service URL. The agent logs `paired <12 hex of node> (<label>)`, where the label is `<user>@<hostname>` of your machine.
|
|
92
92
|
|
|
93
|
-
A token that does not start with `letify-agent2:` takes the older Tailcat path of `letify client shell connect
|
|
93
|
+
The login then opens one session to the agent, checks the workspace root and records the GPUs over it, so no SSH key and no SSH server are involved. A token that does not start with `letify-agent2:` takes the older Tailcat path of `letify client shell connect`. That path still works until 3.0, prints a notice that Tailcat is removed then, and is covered in [Tunnel](02-providers.md).
|
|
94
|
+
|
|
95
|
+
To reach the machine's SSH server anyway, call `Tunnel.ssh_forward()` on the account. It returns a loopback port, and `ssh -p <port> <user>@127.0.0.1` reaches the sshd that `letify agent serve --ssh-target HOST:PORT` names (default `127.0.0.1:22`). letify itself never needs it.
|
|
94
96
|
|
|
95
97
|
---
|
|
96
98
|
|
|
@@ -156,31 +156,51 @@ RTX_PRO_6000 = { indices = "4-5" }
|
|
|
156
156
|
|
|
157
157
|
## 🕳️ Tunnel, NAT 뒤의 머신용
|
|
158
158
|
|
|
159
|
-
인바운드 연결을 받을 수 없는 머신용입니다. letify는
|
|
159
|
+
인바운드 연결을 받을 수 없는 머신용입니다. letify는 머신에서 실행하는 작은 에이전트로 접속하므로, 머신에 SSH 서버도, 열린 포트도, 추가 프로그램도 필요 없습니다. 설정은 머신마다 명령 하나씩이고, 머신에는 letify가 필요합니다. 전체 과정은 [에이전트 가이드](09-에이전트.md)에 있습니다.
|
|
160
160
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
**1. 원격 머신에서** 에이전트를 시작합니다.
|
|
161
|
+
**1. 머신에서** 에이전트를 시작합니다.
|
|
164
162
|
|
|
165
163
|
```bash
|
|
166
|
-
letify
|
|
164
|
+
letify agent serve
|
|
167
165
|
```
|
|
168
166
|
|
|
169
|
-
|
|
167
|
+
내 머신에서 실행할 명령 하나를 출력합니다. 토큰은 15분 뒤 만료되고 한 번만 쓸 수 있습니다.
|
|
170
168
|
|
|
171
169
|
```
|
|
172
|
-
letify login tunnel home_box --connect
|
|
170
|
+
letify login tunnel home_box --connect letify-agent2:eyJ2IjoyLCJhZ2Vu...
|
|
173
171
|
```
|
|
174
172
|
|
|
175
|
-
에이전트는 계속 실행해 두세요. 예를 들어 `tmux` 안에서 띄우면 됩니다.
|
|
173
|
+
에이전트는 계속 실행해 두세요. 예를 들어 `tmux` 안에서 띄우면 됩니다. 노트북을 다시 시작해도 계속 서비스하고, 페어링 목록은 에이전트를 다시 시작해도 남습니다.
|
|
176
174
|
|
|
177
175
|
**2. 내 머신에서** 출력된 명령을 실행합니다.
|
|
178
176
|
|
|
179
177
|
```bash
|
|
180
|
-
letify login tunnel home_box --connect
|
|
178
|
+
letify login tunnel home_box --connect letify-agent2:eyJ2IjoyLCJhZ2Vu...
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
이 머신을 에이전트와 페어링하고, 세션 하나를 열어 그 세션으로 워크스페이스 루트를 점검하고 GPU를 기록합니다. SSH 키를 설치하지 않고 SSH 서버도 필요 없습니다. 그다음 `letify check home_box`로 머신이 응답하는지 확인합니다. `~/.letify/config.toml`에 쓰이는 계정은 주소 없이 이렇게 생깁니다.
|
|
182
|
+
|
|
183
|
+
```toml
|
|
184
|
+
[home_box]
|
|
185
|
+
kind = "tunnel"
|
|
186
|
+
agent = "3f9c..."
|
|
187
|
+
signal = "https://letify.darkpyonix.dev"
|
|
181
188
|
```
|
|
182
189
|
|
|
183
|
-
`letify login
|
|
190
|
+
`letify login tunnel home_box --detect-devices`는 같은 세션으로 머신의 GPU를 다시 확인합니다. 머신에 일반 `ssh`로 붙고 싶다면 `Tunnel.ssh_forward()`가 에이전트 머신의 SSH 서버로 가는 루프백 포트를 열어 줍니다. 자세한 내용은 [에이전트 가이드](09-에이전트.md)에 있습니다.
|
|
191
|
+
|
|
192
|
+
### 기존 Tailcat 계정
|
|
193
|
+
|
|
194
|
+
`letify client shell connect`로 만든 Tunnel 계정은 이 릴리스에서도 계속 동작하고, 프로세스마다 한 번 Tailcat이 3.0에서 제거된다고 알려 줍니다. 옮기려면 머신에서 `letify agent serve`를 실행하고, 출력된 토큰으로 `letify login tunnel home_box --connect letify-agent2:...`를 실행하세요. 이미 선언된 계정을 갱신하려면 `--replace`를 붙입니다. 아래 Tailcat 설정은 3.0까지 그대로 쓸 수 있습니다.
|
|
195
|
+
|
|
196
|
+
<details>
|
|
197
|
+
<summary>Tailcat 설정, 3.0까지</summary>
|
|
198
|
+
|
|
199
|
+
letify는 [Tailcat](https://github.com/tailscale/tailcat)으로 머신에 붙고, 작업은 SSH가 합니다. 두 머신 모두 `tailcat`이 필요하고, 원격 머신에는 letify와 SSH 서버가 필요합니다.
|
|
200
|
+
|
|
201
|
+
원격 머신에서 `letify client shell connect --name home_box`를 실행합니다. `tailcat`이 없으면 [tailcat과 eci 설치](#tailcat과-eci-설치)대로 설치합니다. 자동 설치를 꺼 두었거나 SSH 서버가 없으면 그 머신에 맞는 설치 방법을 그대로 출력하고 종료합니다. 둘 다 있으면 내 머신에서 실행할 명령 `letify login tunnel home_box --connect eyJ0YWlsY2F0Ijoi...` 하나를 출력합니다. 에이전트는 모든 연결을 나르고 다시 시작하면 주소가 바뀌므로 계속 실행해 두세요.
|
|
202
|
+
|
|
203
|
+
내 머신에서 로그인은 `letify login shell`과 똑같이 Tailcat을 통해 SSH 키를 설치하고(원격 비밀번호를 한 번 입력합니다), 키를 확인하고, 워크스페이스 루트를 점검하고, GPU를 기록합니다. 계정은 이렇게 생깁니다.
|
|
184
204
|
|
|
185
205
|
```toml
|
|
186
206
|
[home_box]
|
|
@@ -192,6 +212,8 @@ port = 22
|
|
|
192
212
|
key = "~/.ssh/id_letify"
|
|
193
213
|
```
|
|
194
214
|
|
|
215
|
+
</details>
|
|
216
|
+
|
|
195
217
|
더 단순한 경로를 먼저 시도하세요. 직접 주소, 그다음 점프 호스트, 그다음 터널입니다. 학교 머신은 앞의 두 개가 되는 경우가 많습니다. 상세한 측정치는 [docs/NETWORK.md](../../NETWORK.md)에 있습니다.
|
|
196
218
|
|
|
197
219
|
## ☁️ Modal
|
{letify-2.11.4 → letify-2.12.0}/docs/guide/ko/09-/354/227/220/354/235/264/354/240/204/355/212/270.md
RENAMED
|
@@ -90,7 +90,9 @@ letify는 이 계정의 키 `~/.letify/accounts/lab_box/link.key`를 만들고,
|
|
|
90
90
|
|
|
91
91
|
성공하면 계정에 `kind = "tunnel"`, 에이전트의 노드 id, 서비스 URL이 기록됩니다. 에이전트는 `paired <노드 앞 12자리> (<라벨>)`을 로그에 남기고, 라벨은 내 머신의 `<사용자>@<호스트명>`입니다.
|
|
92
92
|
|
|
93
|
-
`letify-agent2:`로 시작하지 않는 토큰은 `letify client shell connect`의 기존 Tailcat 경로로 갑니다. 이
|
|
93
|
+
이어서 로그인은 에이전트에 세션 하나를 열고, 그 세션으로 워크스페이스 루트를 점검하고 GPU를 기록하므로 SSH 키도 SSH 서버도 관여하지 않습니다. `letify-agent2:`로 시작하지 않는 토큰은 `letify client shell connect`의 기존 Tailcat 경로로 갑니다. 이 경로는 3.0까지 동작하고, 그때 Tailcat이 제거된다는 안내를 출력하며, [Tunnel](02-프로바이더.md)에서 다룹니다.
|
|
94
|
+
|
|
95
|
+
머신의 SSH 서버에 그래도 붙고 싶다면 계정의 `Tunnel.ssh_forward()`를 호출하세요. 루프백 포트를 돌려주고, `ssh -p <포트> <사용자>@127.0.0.1`이 `letify agent serve --ssh-target HOST:PORT`가 가리키는 sshd(기본 `127.0.0.1:22`)에 닿습니다. letify 자체는 이것을 필요로 하지 않습니다.
|
|
94
96
|
|
|
95
97
|
---
|
|
96
98
|
|
|
@@ -298,7 +298,7 @@ Kaggle 선언에는 `host=letify.remote`를 써야 합니다. Kaggle은 인바
|
|
|
298
298
|
3. [Tailcat](https://github.com/tailscale/tailcat)으로 UDP 홀펀칭한 뒤 그 위로 SSH
|
|
299
299
|
4. 프로바이더 자체 경로, 예를 들어 `colab exec`와 Colab 파일 API
|
|
300
300
|
|
|
301
|
-
번호가 낮은 방법이 이깁니다. 다만 연결된 방법 중 가장 빠른 것보다 훨씬 느리면 탈락합니다. 이긴 방법은 계정과 네트워크별로 기억해 두고, 다음 연결에서 먼저 시도합니다. NAT 뒤에 있는
|
|
301
|
+
번호가 낮은 방법이 이깁니다. 다만 연결된 방법 중 가장 빠른 것보다 훨씬 느리면 탈락합니다. 이긴 방법은 계정과 네트워크별로 기억해 두고, 다음 연결에서 먼저 시도합니다. NAT 뒤에 있는 머신은 letify를 설치한 뒤 그 머신에서 `letify agent serve`를 한 번 실행하면 letify가 접속할 수 있고, SSH 서버도 Tailcat도 필요 없습니다. `letify client shell connect`로 만든 계정은 3.0까지 Tailcat으로 계속 동작하고, 그때 Tailcat이 제거된다는 안내를 출력합니다. 그 머신의 SSH 서버가 Docker의 `-p 30501:8022`처럼 다른 포트로 외부에도 열려 있다면 `letify client shell connect --ssh-port 8022 --public-address <host> --public-port 30501`로 실행합니다. 그러면 주소로 바로 하는 SSH는 30501 포트로 접속하고, 홀펀칭과 Tailcat은 계속 8022를 씁니다. 이미 있는 계정에는 `letify login tunnel <alias> --address <host> --public-port 30501`로 같은 값을 설정합니다. Colab과 Elice는 이 단계가 아예 필요 없습니다. 프로바이더 계층이 각 서비스의 API로 머신을 만들고 여는 과정이 `letify client shell connect`를 대신하기 때문입니다. Modal은 자체 API로 연결하므로 여기에 해당하지 않습니다.
|
|
302
302
|
|
|
303
303
|
**여러 계정을 정식으로 지원합니다.** 설정 항목 하나가 계정 하나이고, 같은 종류를 여러 개 둘 수 있습니다. Colab 계정이 두 개면 동시 세션도 두 배가 됩니다.
|
|
304
304
|
|
|
@@ -464,7 +464,8 @@ def test_train_returns_a_loss():
|
|
|
464
464
|
```bash
|
|
465
465
|
letify login shell lab # 계정을 등록하고, 이 저장소에서 참조
|
|
466
466
|
letify logout lab # 이 머신에서 계정 제거
|
|
467
|
-
letify
|
|
467
|
+
letify agent serve # NAT 뒤 머신에서 실행해, letify가 접속할 수 있게 함
|
|
468
|
+
letify client shell connect # 같은 일의 Tailcat 방식, 3.0에서 제거
|
|
468
469
|
letify setup tailcat # 배포처에서 tailcat 또는 eci를 미리 설치
|
|
469
470
|
letify providers # 선언된 프로바이더, 저장소 수명, 기본 배치
|
|
470
471
|
letify devices # 각자 제공하는 GPU
|
|
@@ -285,6 +285,13 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
285
285
|
default=4,
|
|
286
286
|
help="how many nodes may have a running shim at once",
|
|
287
287
|
)
|
|
288
|
+
serve.add_argument(
|
|
289
|
+
"--ssh-target",
|
|
290
|
+
dest="ssh_target",
|
|
291
|
+
metavar="HOST:PORT",
|
|
292
|
+
help="the sshd a paired node reaches over its session; defaults to agent/config.toml, "
|
|
293
|
+
"then 127.0.0.1:22",
|
|
294
|
+
)
|
|
288
295
|
serve.add_argument("--name", help="the alias the printed login command names")
|
|
289
296
|
unpair = agent_sub.add_parser("unpair", help="stop serving a paired node")
|
|
290
297
|
unpair.add_argument("node", help="the node id, or a prefix of at least 8 characters")
|
|
@@ -324,6 +331,7 @@ def _agent_command(args: argparse.Namespace) -> int:
|
|
|
324
331
|
|
|
325
332
|
try:
|
|
326
333
|
url = linkagent.signal_url(home, args.signal)
|
|
334
|
+
target = linkagent.ssh_target(home, args.ssh_target)
|
|
327
335
|
binary = linkd.require_binary()
|
|
328
336
|
daemon = linkagent.open_daemon(home, binary=binary)
|
|
329
337
|
except (linkagent.AgentError, linkd.LinkError) as exc:
|
|
@@ -342,6 +350,7 @@ def _agent_command(args: argparse.Namespace) -> int:
|
|
|
342
350
|
relay=relay_program(),
|
|
343
351
|
log=log,
|
|
344
352
|
max_conversations=args.max_conversations,
|
|
353
|
+
ssh_target=target,
|
|
345
354
|
)
|
|
346
355
|
token = service.new_token(url)
|
|
347
356
|
alias = args.name or setup_default_alias()
|
|
@@ -421,6 +430,7 @@ def _client_shell_connect(args: argparse.Namespace) -> int:
|
|
|
421
430
|
"A restart gets a new address, so run the login again with the new token it prints."
|
|
422
431
|
)
|
|
423
432
|
)
|
|
433
|
+
print(style.dim("Tailcat is removed in 3.0. Run 'letify agent serve' on this machine instead."))
|
|
424
434
|
sys.stdout.flush()
|
|
425
435
|
try:
|
|
426
436
|
agent.serve_forever()
|