letify 3.0.0__tar.gz → 3.0.2__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.
Files changed (320) hide show
  1. {letify-3.0.0 → letify-3.0.2}/PKG-INFO +1 -1
  2. {letify-3.0.0 → letify-3.0.2}/docs/SPEC.md +2 -2
  3. {letify-3.0.0 → letify-3.0.2}/letify/__init__.py +1 -1
  4. {letify-3.0.0 → letify-3.0.2}/letify/config/login.py +4 -0
  5. {letify-3.0.0 → letify-3.0.2}/letify/providers/kaggle.py +73 -18
  6. {letify-3.0.0 → letify-3.0.2}/letify-core/Cargo.lock +2 -2
  7. {letify-3.0.0 → letify-3.0.2}/letify-core/Cargo.toml +1 -1
  8. {letify-3.0.0 → letify-3.0.2}/letify-ext/package-lock.json +2 -2
  9. {letify-3.0.0 → letify-3.0.2}/letify-ext/package.json +1 -1
  10. {letify-3.0.0 → letify-3.0.2}/pyproject.toml +1 -1
  11. {letify-3.0.0 → letify-3.0.2}/tests/conftest.py +3 -1
  12. {letify-3.0.0 → letify-3.0.2}/tests/test_kaggle.py +53 -0
  13. {letify-3.0.0 → letify-3.0.2}/.github/workflows/ci.yml +0 -0
  14. {letify-3.0.0 → letify-3.0.2}/.github/workflows/docs.yml +0 -0
  15. {letify-3.0.0 → letify-3.0.2}/.github/workflows/letify-link.yml +0 -0
  16. {letify-3.0.0 → letify-3.0.2}/.github/workflows/publish-crates.yml +0 -0
  17. {letify-3.0.0 → letify-3.0.2}/.github/workflows/publish.yml +0 -0
  18. {letify-3.0.0 → letify-3.0.2}/.github/workflows/reserve-crates.yml +0 -0
  19. {letify-3.0.0 → letify-3.0.2}/.gitignore +0 -0
  20. {letify-3.0.0 → letify-3.0.2}/.researchtree +0 -0
  21. {letify-3.0.0 → letify-3.0.2}/CLAUDE.md +0 -0
  22. {letify-3.0.0 → letify-3.0.2}/LICENSE +0 -0
  23. {letify-3.0.0 → letify-3.0.2}/PROJECT.md +0 -0
  24. {letify-3.0.0 → letify-3.0.2}/README.md +0 -0
  25. {letify-3.0.0 → letify-3.0.2}/docs/COMPONENT.md +0 -0
  26. {letify-3.0.0 → letify-3.0.2}/docs/INTENT.md +0 -0
  27. {letify-3.0.0 → letify-3.0.2}/docs/NETWORK.md +0 -0
  28. {letify-3.0.0 → letify-3.0.2}/docs/ROADMAP-3.0.md +0 -0
  29. {letify-3.0.0 → letify-3.0.2}/docs/guide/01-getting-started.md +0 -0
  30. {letify-3.0.0 → letify-3.0.2}/docs/guide/02-providers.md +0 -0
  31. {letify-3.0.0 → letify-3.0.2}/docs/guide/03-execution-modes.md +0 -0
  32. {letify-3.0.0 → letify-3.0.2}/docs/guide/04-environments-and-data.md +0 -0
  33. {letify-3.0.0 → letify-3.0.2}/docs/guide/05-concurrency.md +0 -0
  34. {letify-3.0.0 → letify-3.0.2}/docs/guide/06-cost.md +0 -0
  35. {letify-3.0.0 → letify-3.0.2}/docs/guide/07-troubleshooting.md +0 -0
  36. {letify-3.0.0 → letify-3.0.2}/docs/guide/08-releasing.md +0 -0
  37. {letify-3.0.0 → letify-3.0.2}/docs/guide/09-agent.md +0 -0
  38. {letify-3.0.0 → letify-3.0.2}/docs/guide/README.md +0 -0
  39. {letify-3.0.0 → letify-3.0.2}/docs/guide/ko/01-/354/213/234/354/236/221/355/225/230/352/270/260.md" +0 -0
  40. {letify-3.0.0 → letify-3.0.2}/docs/guide/ko/02-/355/224/204/353/241/234/353/260/224/354/235/264/353/215/224.md" +0 -0
  41. {letify-3.0.0 → letify-3.0.2}/docs/guide/ko/03-/354/213/244/355/226/211-/353/260/251/354/213/235.md" +0 -0
  42. {letify-3.0.0 → letify-3.0.2}/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
  43. {letify-3.0.0 → letify-3.0.2}/docs/guide/ko/05-/353/217/231/354/213/234-/354/213/244/355/226/211.md" +0 -0
  44. {letify-3.0.0 → letify-3.0.2}/docs/guide/ko/06-/353/271/204/354/232/251.md" +0 -0
  45. {letify-3.0.0 → letify-3.0.2}/docs/guide/ko/07-/353/254/270/354/240/234-/355/225/264/352/262/260.md" +0 -0
  46. {letify-3.0.0 → letify-3.0.2}/docs/guide/ko/08-/353/246/264/353/246/254/354/212/244.md" +0 -0
  47. {letify-3.0.0 → letify-3.0.2}/docs/guide/ko/09-/354/227/220/354/235/264/354/240/204/355/212/270.md" +0 -0
  48. {letify-3.0.0 → letify-3.0.2}/docs/guide/ko/README.md +0 -0
  49. {letify-3.0.0 → letify-3.0.2}/docs/locales/README_ko.md +0 -0
  50. {letify-3.0.0 → letify-3.0.2}/docs/mkdocs.yml +0 -0
  51. {letify-3.0.0 → letify-3.0.2}/examples/README.md +0 -0
  52. {letify-3.0.0 → letify-3.0.2}/examples/nvfp4-lora/.letify.example +0 -0
  53. {letify-3.0.0 → letify-3.0.2}/examples/nvfp4-lora/00_smoke.py +0 -0
  54. {letify-3.0.0 → letify-3.0.2}/examples/nvfp4-lora/01_sweep.py +0 -0
  55. {letify-3.0.0 → letify-3.0.2}/examples/nvfp4-lora/02_resume.py +0 -0
  56. {letify-3.0.0 → letify-3.0.2}/examples/nvfp4-lora/03_watch.py +0 -0
  57. {letify-3.0.0 → letify-3.0.2}/examples/nvfp4-lora/README.md +0 -0
  58. {letify-3.0.0 → letify-3.0.2}/examples/nvfp4-lora/README_ko.md +0 -0
  59. {letify-3.0.0 → letify-3.0.2}/examples/nvfp4-lora/common.py +0 -0
  60. {letify-3.0.0 → letify-3.0.2}/examples/nvfp4-lora/recipe.py +0 -0
  61. {letify-3.0.0 → letify-3.0.2}/letify/cli.py +0 -0
  62. {letify-3.0.0 → letify-3.0.2}/letify/config/__init__.py +0 -0
  63. {letify-3.0.0 → letify-3.0.2}/letify/config/inventory.py +0 -0
  64. {letify-3.0.0 → letify-3.0.2}/letify/config/schema.py +0 -0
  65. {letify-3.0.0 → letify-3.0.2}/letify/config/secrets.py +0 -0
  66. {letify-3.0.0 → letify-3.0.2}/letify/config/writer.py +0 -0
  67. {letify-3.0.0 → letify-3.0.2}/letify/declare/__init__.py +0 -0
  68. {letify-3.0.0 → letify-3.0.2}/letify/declare/cache.py +0 -0
  69. {letify-3.0.0 → letify-3.0.2}/letify/declare/env.py +0 -0
  70. {letify-3.0.0 → letify-3.0.2}/letify/declare/exit.py +0 -0
  71. {letify-3.0.0 → letify-3.0.2}/letify/declare/function.py +0 -0
  72. {letify-3.0.0 → letify-3.0.2}/letify/declare/instance.py +0 -0
  73. {letify-3.0.0 → letify-3.0.2}/letify/declare/reduce.py +0 -0
  74. {letify-3.0.0 → letify-3.0.2}/letify/declare/replicas.py +0 -0
  75. {letify-3.0.0 → letify-3.0.2}/letify/errors.py +0 -0
  76. {letify-3.0.0 → letify-3.0.2}/letify/install.py +0 -0
  77. {letify-3.0.0 → letify-3.0.2}/letify/launcher.py +0 -0
  78. {letify-3.0.0 → letify-3.0.2}/letify/paths.py +0 -0
  79. {letify-3.0.0 → letify-3.0.2}/letify/protocol/__init__.py +0 -0
  80. {letify-3.0.0 → letify-3.0.2}/letify/protocol/codec.py +0 -0
  81. {letify-3.0.0 → letify-3.0.2}/letify/protocol/driver.py +0 -0
  82. {letify-3.0.0 → letify-3.0.2}/letify/protocol/handle.py +0 -0
  83. {letify-3.0.0 → letify-3.0.2}/letify/protocol/wire.py +0 -0
  84. {letify-3.0.0 → letify-3.0.2}/letify/protocol/worker.py +0 -0
  85. {letify-3.0.0 → letify-3.0.2}/letify/providers/__init__.py +0 -0
  86. {letify-3.0.0 → letify-3.0.2}/letify/providers/base.py +0 -0
  87. {letify-3.0.0 → letify-3.0.2}/letify/providers/colab.py +0 -0
  88. {letify-3.0.0 → letify-3.0.2}/letify/providers/colab_files.py +0 -0
  89. {letify-3.0.0 → letify-3.0.2}/letify/providers/colab_keepalive.py +0 -0
  90. {letify-3.0.0 → letify-3.0.2}/letify/providers/elice.py +0 -0
  91. {letify-3.0.0 → letify-3.0.2}/letify/providers/kaggle_adapter.py +0 -0
  92. {letify-3.0.0 → letify-3.0.2}/letify/providers/local.py +0 -0
  93. {letify-3.0.0 → letify-3.0.2}/letify/providers/modal.py +0 -0
  94. {letify-3.0.0 → letify-3.0.2}/letify/providers/modal_adapter.py +0 -0
  95. {letify-3.0.0 → letify-3.0.2}/letify/providers/naming.py +0 -0
  96. {letify-3.0.0 → letify-3.0.2}/letify/providers/shell.py +0 -0
  97. {letify-3.0.0 → letify-3.0.2}/letify/providers/tunnel.py +0 -0
  98. {letify-3.0.0 → letify-3.0.2}/letify/providers/usage.py +0 -0
  99. {letify-3.0.0 → letify-3.0.2}/letify/remoting/__init__.py +0 -0
  100. {letify-3.0.0 → letify-3.0.2}/letify/remoting/device/__init__.py +0 -0
  101. {letify-3.0.0 → letify-3.0.2}/letify/remoting/device/client.py +0 -0
  102. {letify-3.0.0 → letify-3.0.2}/letify/remoting/device/cuda.py +0 -0
  103. {letify-3.0.0 → letify-3.0.2}/letify/remoting/device/executor.py +0 -0
  104. {letify-3.0.0 → letify-3.0.2}/letify/remoting/device/frames.py +0 -0
  105. {letify-3.0.0 → letify-3.0.2}/letify/remoting/device/guard.py +0 -0
  106. {letify-3.0.0 → letify-3.0.2}/letify/remoting/device/tensor.py +0 -0
  107. {letify-3.0.0 → letify-3.0.2}/letify/remoting/device/trace.py +0 -0
  108. {letify-3.0.0 → letify-3.0.2}/letify/remoting/device/value.py +0 -0
  109. {letify-3.0.0 → letify-3.0.2}/letify/render.py +0 -0
  110. {letify-3.0.0 → letify-3.0.2}/letify/runtime/__init__.py +0 -0
  111. {letify-3.0.0 → letify-3.0.2}/letify/runtime/bootstrap.py +0 -0
  112. {letify-3.0.0 → letify-3.0.2}/letify/runtime/broker.py +0 -0
  113. {letify-3.0.0 → letify-3.0.2}/letify/runtime/channel.py +0 -0
  114. {letify-3.0.0 → letify-3.0.2}/letify/runtime/control.py +0 -0
  115. {letify-3.0.0 → letify-3.0.2}/letify/runtime/lease.py +0 -0
  116. {letify-3.0.0 → letify-3.0.2}/letify/runtime/pool.py +0 -0
  117. {letify-3.0.0 → letify-3.0.2}/letify/runtime/reattach.py +0 -0
  118. {letify-3.0.0 → letify-3.0.2}/letify/runtime/session.py +0 -0
  119. {letify-3.0.0 → letify-3.0.2}/letify/runtime/takeover.py +0 -0
  120. {letify-3.0.0 → letify-3.0.2}/letify/runtime/telemetry.py +0 -0
  121. {letify-3.0.0 → letify-3.0.2}/letify/runtime/workers.py +0 -0
  122. {letify-3.0.0 → letify-3.0.2}/letify/store/__init__.py +0 -0
  123. {letify-3.0.0 → letify-3.0.2}/letify/store/backends/__init__.py +0 -0
  124. {letify-3.0.0 → letify-3.0.2}/letify/store/backends/drive.py +0 -0
  125. {letify-3.0.0 → letify-3.0.2}/letify/store/backends/filesystem.py +0 -0
  126. {letify-3.0.0 → letify-3.0.2}/letify/store/backends/google_auth.py +0 -0
  127. {letify-3.0.0 → letify-3.0.2}/letify/store/backends/layout.py +0 -0
  128. {letify-3.0.0 → letify-3.0.2}/letify/store/backends/objects.py +0 -0
  129. {letify-3.0.0 → letify-3.0.2}/letify/store/cas.py +0 -0
  130. {letify-3.0.0 → letify-3.0.2}/letify/store/handoff.py +0 -0
  131. {letify-3.0.0 → letify-3.0.2}/letify/store/pathdata.py +0 -0
  132. {letify-3.0.0 → letify-3.0.2}/letify/store/sendorder.py +0 -0
  133. {letify-3.0.0 → letify-3.0.2}/letify/store/volume.py +0 -0
  134. {letify-3.0.0 → letify-3.0.2}/letify/stubs.py +0 -0
  135. {letify-3.0.0 → letify-3.0.2}/letify/tools.py +0 -0
  136. {letify-3.0.0 → letify-3.0.2}/letify/transport/__init__.py +0 -0
  137. {letify-3.0.0 → letify-3.0.2}/letify/transport/announce.py +0 -0
  138. {letify-3.0.0 → letify-3.0.2}/letify/transport/link.py +0 -0
  139. {letify-3.0.0 → letify-3.0.2}/letify/transport/linkagent.py +0 -0
  140. {letify-3.0.0 → letify-3.0.2}/letify/transport/linkchannel.py +0 -0
  141. {letify-3.0.0 → letify-3.0.2}/letify/transport/linkd.py +0 -0
  142. {letify-3.0.0 → letify-3.0.2}/letify/transport/linkmailbox.py +0 -0
  143. {letify-3.0.0 → letify-3.0.2}/letify/transport/linkpump.py +0 -0
  144. {letify-3.0.0 → letify-3.0.2}/letify/transport/linkshim.py +0 -0
  145. {letify-3.0.0 → letify-3.0.2}/letify/transport/linksignal.py +0 -0
  146. {letify-3.0.0 → letify-3.0.2}/letify/transport/linkupload.py +0 -0
  147. {letify-3.0.0 → letify-3.0.2}/letify/transport/linkwebsocket.py +0 -0
  148. {letify-3.0.0 → letify-3.0.2}/letify/transport/nat.py +0 -0
  149. {letify-3.0.0 → letify-3.0.2}/letify/transport/pipeline.py +0 -0
  150. {letify-3.0.0 → letify-3.0.2}/letify/transport/portmap.py +0 -0
  151. {letify-3.0.0 → letify-3.0.2}/letify/transport/probe.py +0 -0
  152. {letify-3.0.0 → letify-3.0.2}/letify/transport/rendezvous.py +0 -0
  153. {letify-3.0.0 → letify-3.0.2}/letify/transport/sshopts.py +0 -0
  154. {letify-3.0.0 → letify-3.0.2}/letify/transport/strategies.py +0 -0
  155. {letify-3.0.0 → letify-3.0.2}/letify/useragent.py +0 -0
  156. {letify-3.0.0 → letify-3.0.2}/letify-core/.gitignore +0 -0
  157. {letify-3.0.0 → letify-3.0.2}/letify-core/build.py +0 -0
  158. {letify-3.0.0 → letify-3.0.2}/letify-core/letify/Cargo.toml +0 -0
  159. {letify-3.0.0 → letify-3.0.2}/letify-core/letify/LICENSE +0 -0
  160. {letify-3.0.0 → letify-3.0.2}/letify-core/letify/README.md +0 -0
  161. {letify-3.0.0 → letify-3.0.2}/letify-core/letify/src/lib.rs +0 -0
  162. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/Cargo.toml +0 -0
  163. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/examples/bench.rs +0 -0
  164. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/acceptor.rs +0 -0
  165. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/bin/letify-link.rs +0 -0
  166. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/config.rs +0 -0
  167. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/error.rs +0 -0
  168. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/frame.rs +0 -0
  169. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/handshake.rs +0 -0
  170. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/hysteresis.rs +0 -0
  171. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/identity.rs +0 -0
  172. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/keys.rs +0 -0
  173. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/lib.rs +0 -0
  174. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/observe.rs +0 -0
  175. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/paths.rs +0 -0
  176. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/plan.rs +0 -0
  177. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/policing.rs +0 -0
  178. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/punch.rs +0 -0
  179. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/record.rs +0 -0
  180. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/relay.rs +0 -0
  181. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/rendezvous.rs +0 -0
  182. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/replay.rs +0 -0
  183. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/session.rs +0 -0
  184. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/sidecar.rs +0 -0
  185. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/stream.rs +0 -0
  186. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/stun.rs +0 -0
  187. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/tcp.rs +0 -0
  188. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/trace.rs +0 -0
  189. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/src/udp.rs +0 -0
  190. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/acceptor.rs +0 -0
  191. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/api.rs +0 -0
  192. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/common/mod.rs +0 -0
  193. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/diag_sim.rs +0 -0
  194. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/fairness.rs +0 -0
  195. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/gauge.rs +0 -0
  196. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/handshake.rs +0 -0
  197. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/hysteresis.rs +0 -0
  198. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/keepalive.rs +0 -0
  199. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/mobile.rs +0 -0
  200. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/nat.rs +0 -0
  201. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/paths.rs +0 -0
  202. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/qad.rs +0 -0
  203. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/rekey.rs +0 -0
  204. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/relay.rs +0 -0
  205. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/relay_pairing.rs +0 -0
  206. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/rendezvous.rs +0 -0
  207. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/reorder.rs +0 -0
  208. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/replay.rs +0 -0
  209. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/resume.rs +0 -0
  210. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/revoke.rs +0 -0
  211. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/session.rs +0 -0
  212. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/sidecar.rs +0 -0
  213. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/startup.rs +0 -0
  214. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/subflows.rs +0 -0
  215. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/trace.rs +0 -0
  216. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/udp.rs +0 -0
  217. {letify-3.0.0 → letify-3.0.2}/letify-core/letify-link/tests/udp_bench.rs +0 -0
  218. {letify-3.0.0 → letify-3.0.2}/letify-core/rust-toolchain.toml +0 -0
  219. {letify-3.0.0 → letify-3.0.2}/letify-ext/.vscodeignore +0 -0
  220. {letify-3.0.0 → letify-3.0.2}/letify-ext/LICENSE +0 -0
  221. {letify-3.0.0 → letify-3.0.2}/letify-ext/README.md +0 -0
  222. {letify-3.0.0 → letify-3.0.2}/letify-ext/media/icon.svg +0 -0
  223. {letify-3.0.0 → letify-3.0.2}/letify-ext/src/cli.ts +0 -0
  224. {letify-3.0.0 → letify-3.0.2}/letify-ext/src/extension.ts +0 -0
  225. {letify-3.0.0 → letify-3.0.2}/letify-ext/src/history.ts +0 -0
  226. {letify-3.0.0 → letify-3.0.2}/letify-ext/src/model.ts +0 -0
  227. {letify-3.0.0 → letify-3.0.2}/letify-ext/src/poll.ts +0 -0
  228. {letify-3.0.0 → letify-3.0.2}/letify-ext/src/render.ts +0 -0
  229. {letify-3.0.0 → letify-3.0.2}/letify-ext/test/cli.test.ts +0 -0
  230. {letify-3.0.0 → letify-3.0.2}/letify-ext/test/manifest.test.ts +0 -0
  231. {letify-3.0.0 → letify-3.0.2}/letify-ext/test/model.test.ts +0 -0
  232. {letify-3.0.0 → letify-3.0.2}/letify-ext/test/regressions.test.ts +0 -0
  233. {letify-3.0.0 → letify-3.0.2}/letify-ext/tsconfig.json +0 -0
  234. {letify-3.0.0 → letify-3.0.2}/letify-signal/README.md +0 -0
  235. {letify-3.0.0 → letify-3.0.2}/letify-signal/cloudflare.config.ts +0 -0
  236. {letify-3.0.0 → letify-3.0.2}/letify-signal/package-lock.json +0 -0
  237. {letify-3.0.0 → letify-3.0.2}/letify-signal/package.json +0 -0
  238. {letify-3.0.0 → letify-3.0.2}/letify-signal/src/auth.ts +0 -0
  239. {letify-3.0.0 → letify-3.0.2}/letify-signal/src/ed25519.ts +0 -0
  240. {letify-3.0.0 → letify-3.0.2}/letify-signal/src/handler.ts +0 -0
  241. {letify-3.0.0 → letify-3.0.2}/letify-signal/src/index.ts +0 -0
  242. {letify-3.0.0 → letify-3.0.2}/letify-signal/src/limiter.ts +0 -0
  243. {letify-3.0.0 → letify-3.0.2}/letify-signal/src/mailbox.ts +0 -0
  244. {letify-3.0.0 → letify-3.0.2}/letify-signal/src/objects.ts +0 -0
  245. {letify-3.0.0 → letify-3.0.2}/letify-signal/src/protocol.ts +0 -0
  246. {letify-3.0.0 → letify-3.0.2}/letify-signal/src/storage.ts +0 -0
  247. {letify-3.0.0 → letify-3.0.2}/letify-signal/test/auth.test.ts +0 -0
  248. {letify-3.0.0 → letify-3.0.2}/letify-signal/test/ed25519.test.ts +0 -0
  249. {letify-3.0.0 → letify-3.0.2}/letify-signal/test/helpers.ts +0 -0
  250. {letify-3.0.0 → letify-3.0.2}/letify-signal/test/interop.test.ts +0 -0
  251. {letify-3.0.0 → letify-3.0.2}/letify-signal/test/limiter.test.ts +0 -0
  252. {letify-3.0.0 → letify-3.0.2}/letify-signal/test/mailbox.test.ts +0 -0
  253. {letify-3.0.0 → letify-3.0.2}/letify-signal/test/objects.test.ts +0 -0
  254. {letify-3.0.0 → letify-3.0.2}/letify-signal/test/setup.ts +0 -0
  255. {letify-3.0.0 → letify-3.0.2}/letify-signal/test/worker.test.ts +0 -0
  256. {letify-3.0.0 → letify-3.0.2}/letify-signal/tsconfig.json +0 -0
  257. {letify-3.0.0 → letify-3.0.2}/letify-signal/vitest.config.ts +0 -0
  258. {letify-3.0.0 → letify-3.0.2}/letify_providers.py +0 -0
  259. {letify-3.0.0 → letify-3.0.2}/scripts/sync-main.sh +0 -0
  260. {letify-3.0.0 → letify-3.0.2}/scripts/version.py +0 -0
  261. {letify-3.0.0 → letify-3.0.2}/tests/fake_kaggle_adapter.py +0 -0
  262. {letify-3.0.0 → letify-3.0.2}/tests/fake_modal_adapter.py +0 -0
  263. {letify-3.0.0 → letify-3.0.2}/tests/test_cli.py +0 -0
  264. {letify-3.0.0 → letify-3.0.2}/tests/test_cli_output.py +0 -0
  265. {letify-3.0.0 → letify-3.0.2}/tests/test_colab_keepalive.py +0 -0
  266. {letify-3.0.0 → letify-3.0.2}/tests/test_config.py +0 -0
  267. {letify-3.0.0 → letify-3.0.2}/tests/test_core.py +0 -0
  268. {letify-3.0.0 → letify-3.0.2}/tests/test_data.py +0 -0
  269. {letify-3.0.0 → letify-3.0.2}/tests/test_data_in_place.py +0 -0
  270. {letify-3.0.0 → letify-3.0.2}/tests/test_data_streaming.py +0 -0
  271. {letify-3.0.0 → letify-3.0.2}/tests/test_declare.py +0 -0
  272. {letify-3.0.0 → letify-3.0.2}/tests/test_device.py +0 -0
  273. {letify-3.0.0 → letify-3.0.2}/tests/test_device_compile.py +0 -0
  274. {letify-3.0.0 → letify-3.0.2}/tests/test_distributed.py +0 -0
  275. {letify-3.0.0 → letify-3.0.2}/tests/test_drive_handoff.py +0 -0
  276. {letify-3.0.0 → letify-3.0.2}/tests/test_drive_store.py +0 -0
  277. {letify-3.0.0 → letify-3.0.2}/tests/test_editor_sessions.py +0 -0
  278. {letify-3.0.0 → letify-3.0.2}/tests/test_elice.py +0 -0
  279. {letify-3.0.0 → letify-3.0.2}/tests/test_frames.py +0 -0
  280. {letify-3.0.0 → letify-3.0.2}/tests/test_install.py +0 -0
  281. {letify-3.0.0 → letify-3.0.2}/tests/test_kaggle_cookie.py +0 -0
  282. {letify-3.0.0 → letify-3.0.2}/tests/test_kaggle_link.py +0 -0
  283. {letify-3.0.0 → letify-3.0.2}/tests/test_link_agent.py +0 -0
  284. {letify-3.0.0 → letify-3.0.2}/tests/test_link_channel.py +0 -0
  285. {letify-3.0.0 → letify-3.0.2}/tests/test_link_command_channel.py +0 -0
  286. {letify-3.0.0 → letify-3.0.2}/tests/test_link_exec.py +0 -0
  287. {letify-3.0.0 → letify-3.0.2}/tests/test_link_log.py +0 -0
  288. {letify-3.0.0 → letify-3.0.2}/tests/test_link_mailbox_close.py +0 -0
  289. {letify-3.0.0 → letify-3.0.2}/tests/test_link_opt_in.py +0 -0
  290. {letify-3.0.0 → letify-3.0.2}/tests/test_link_signal.py +0 -0
  291. {letify-3.0.0 → letify-3.0.2}/tests/test_link_ssh_stream.py +0 -0
  292. {letify-3.0.0 → letify-3.0.2}/tests/test_link_upload.py +0 -0
  293. {letify-3.0.0 → letify-3.0.2}/tests/test_linkd.py +0 -0
  294. {letify-3.0.0 → letify-3.0.2}/tests/test_network_guard.py +0 -0
  295. {letify-3.0.0 → letify-3.0.2}/tests/test_notebook.py +0 -0
  296. {letify-3.0.0 → letify-3.0.2}/tests/test_parallel_placement.py +0 -0
  297. {letify-3.0.0 → letify-3.0.2}/tests/test_paths.py +0 -0
  298. {letify-3.0.0 → letify-3.0.2}/tests/test_portmap.py +0 -0
  299. {letify-3.0.0 → letify-3.0.2}/tests/test_protocol.py +0 -0
  300. {letify-3.0.0 → letify-3.0.2}/tests/test_providers.py +0 -0
  301. {letify-3.0.0 → letify-3.0.2}/tests/test_punch_sockets.py +0 -0
  302. {letify-3.0.0 → letify-3.0.2}/tests/test_quic_removed.py +0 -0
  303. {letify-3.0.0 → letify-3.0.2}/tests/test_remoting.py +0 -0
  304. {letify-3.0.0 → letify-3.0.2}/tests/test_render.py +0 -0
  305. {letify-3.0.0 → letify-3.0.2}/tests/test_run_control.py +0 -0
  306. {letify-3.0.0 → letify-3.0.2}/tests/test_run_reattach.py +0 -0
  307. {letify-3.0.0 → letify-3.0.2}/tests/test_run_takeover.py +0 -0
  308. {letify-3.0.0 → letify-3.0.2}/tests/test_runtime.py +0 -0
  309. {letify-3.0.0 → letify-3.0.2}/tests/test_shell_workers.py +0 -0
  310. {letify-3.0.0 → letify-3.0.2}/tests/test_ship.py +0 -0
  311. {letify-3.0.0 → letify-3.0.2}/tests/test_store.py +0 -0
  312. {letify-3.0.0 → letify-3.0.2}/tests/test_strategies.py +0 -0
  313. {letify-3.0.0 → letify-3.0.2}/tests/test_stubs.py +0 -0
  314. {letify-3.0.0 → letify-3.0.2}/tests/test_suite_guards.py +0 -0
  315. {letify-3.0.0 → letify-3.0.2}/tests/test_tailcat_removed.py +0 -0
  316. {letify-3.0.0 → letify-3.0.2}/tests/test_transport.py +0 -0
  317. {letify-3.0.0 → letify-3.0.2}/tests/test_tunnel_agent_login.py +0 -0
  318. {letify-3.0.0 → letify-3.0.2}/tests/test_tunnel_setup.py +0 -0
  319. {letify-3.0.0 → letify-3.0.2}/tests/test_user_agent.py +0 -0
  320. {letify-3.0.0 → letify-3.0.2}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: letify
3
- Version: 3.0.0
3
+ Version: 3.0.2
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
@@ -290,7 +290,7 @@ Not opening a link is a decision of this project, not a rule of Kaggle's. Two so
290
290
  - `TPU_V3_8` is a TPU instance, carried by `Instance.tpu` rather than `Instance.gpu`, and requests `TPU_V3_8` as the accelerator in `CommitAndRun`. With `host="remote"`, letify ships the whole function to the runtime. Using the TPU is the user's code's responsibility, with `torch-xla` or JAX in the user's own lock file; letify neither installs nor checks those TPU libraries. letify requests and reports the TPU, without making the user's code TPU-capable. Kaggle refuses `host="local"` for TPU instances as it does for every other Kaggle instance.
291
291
  - When no account inventory is configured, the default inventory takes each discovered instance's device count, so the two-card `T4` shape can be reserved. An explicit account inventory keeps its configured counts and indices.
292
292
  - **Two credentials, both required.** The cookie starts and ends the interactive session and mints its Jupyter proxy URL. The API token authenticates every official Kaggle CLI invocation through `KAGGLE_API_TOKEN` in the child environment, never process arguments, for notebook deletion and weekly quota. There is no cookie fallback. Login stores the cookie in `~/.letify/accounts/<alias>/cookie` and the verbatim token, including `KGAT_`, in `access_token` beside it, using owner-only files (0600) and an owner-only directory (0700). The CLI accepts no working file-based token form, so keeping the token out of the environment cannot be honoured. Its child process environment is the narrowest available scope and exposes less than the argument list. An account without `access_token` is refused with `ConfigError` naming the login command when it reaches a CLI-only path.
293
- - **Token input and notebook owner.** `letify login kaggle <alias>` accepts `--key` or hidden input asking for the API token exactly as kaggle.com shows it, including `KGAT_`. It requires that prefix and a nonempty body with no whitespace; it does not strip or reformat the token. Length is not fixed because the measured 32-character body establishes a working token, not a universal length contract. A malformed token is refused with a message naming what to paste, before any cookie verification or file write. The token is not verified online at login. A renewal asks for each credential rather than reusing what is on disk, and a blank answer keeps the stored one. The two credentials expire on different clocks: the cookie is a thirty day web session and the token lasts until it is rotated, so renewing one must not demand the other. `letify login kaggle <alias> --replace` therefore prompts for the token and then the cookie, each saying that blank keeps what is stored, and writes only what was answered. A blank answer with nothing stored is refused, naming what to paste. Silently reusing a stored credential would make a renewal a no-op with no way to replace a credential that stopped working. Login retains `--username` or a username prompt and stores it in `username` beside the credentials with mode 0600. This is only the owner for `kernels delete -y <owner>/<slug>`, not an authentication credential. Explicit input avoids another authenticated lookup and does not mistake a cookie display name for an owner. The owner is not read from an authenticated call. Reading an existing `access_token` file strips leading and trailing whitespace, including a trailing newline, before CLI calls or reuse by login when `--key` is omitted. Explicit `--key` and prompted token input still reject whitespace rather than reformatting it, so adding an owner with `--username` does not require pasting the token again. The owner is a public Kaggle username, not a secret, and its file uses the same owner-only permissions as the account directory. Login refuses a missing or blank owner before cookie verification or any file write. Nothing is written until both credentials, the owner and cookie verification pass. Before any session starts or notebook is created, `open_channel` requires a readable, nonempty `username` file. An incomplete account is refused with `ConfigError` naming the login command, so a run cannot reach teardown without a notebook owner.
293
+ - **Token input and notebook owner.** `letify login kaggle <alias>` accepts `--key` or hidden input asking for the API token exactly as kaggle.com shows it, including `KGAT_`. It requires that prefix and a nonempty body with no whitespace; it does not strip or reformat the token. Length is not fixed because the measured 32-character body establishes a working token, not a universal length contract. A malformed token is refused with a message naming what to paste, before any cookie verification or file write. The token is not verified online at login. A renewal asks for each credential rather than reusing what is on disk, and a blank answer keeps the stored one. The two credentials expire on different clocks: the cookie is a thirty day web session and the token lasts until it is rotated, so renewing one must not demand the other. `letify login kaggle <alias> --replace` therefore prompts for the token and then the cookie, each saying that blank keeps what is stored, and writes only what was answered. A blank answer with nothing stored is refused, naming what to paste. Silently reusing a stored credential would make a renewal a no-op with no way to replace a credential that stopped working. Login retains `--username` or a username prompt and stores it in `username` beside the credentials with mode 0600. This is only the owner for `kernels delete -y <owner>/<slug>`, not an authentication credential. Explicit input avoids another authenticated lookup and does not mistake a cookie display name for an owner. The owner is not read from an authenticated call. Reading an existing `access_token` file strips leading and trailing whitespace, including a trailing newline, before CLI calls or reuse by login when `--key` is omitted. Explicit `--key` and prompted token input still reject whitespace rather than reformatting it, so adding an owner with `--username` does not require pasting the token again. The owner is a public Kaggle username, not a secret, and its file uses the same owner-only permissions as the account directory. Login refuses a missing or blank owner before cookie verification or any file write. Login also refuses an owner that is not a Kaggle username: one containing `@`, whitespace or `/`. An email address is the common mistake, and `kernels delete -y <email>/<slug>` names a notebook that does not exist, which Kaggle answers with 403. The refusal says `<value> looks like an email address; enter the Kaggle username shown in your profile URL kaggle.com/<username>`, and no fuller charset rule is imposed. Nothing is written until both credentials, the owner and cookie verification pass. Before any session starts or notebook is created, `open_channel` requires a readable, nonempty `username` file. An incomplete account is refused with `ConfigError` naming the login command, so a run cannot reach teardown without a notebook owner. A stored owner containing `@`, whitespace or `/` is refused the same way before any notebook is created, with the command that fixes it: `letify login kaggle <alias> --replace --username <username>`, where blank answers keep the stored cookie and token.
294
294
  - **The cookie carries an ``exp`` claim, but that claim is not proof the cookie still works.** The `CLIENT-TOKEN` cookie is an `alg:none` JWT whose `exp` claim was thirty days after the login that minted it, in every case observed. But a live account has been seen with over nine days left on that claim while every internal call, including the plain `users.UsersService/GetCurrentUser` read, answered as a refused, anonymous session: Kaggle invalidates a cookie server side, for reasons this project has not pinned down, without the claim changing to say so. So `exp` is useful for exactly one direction: a cookie past its `exp` is certainly dead. It says nothing about a cookie before its `exp`, which may be live or may already be refused.
295
295
  - **Two checks, for two costs.** An offline check reads only the claim, costs no network call, and is what `letify providers` shows as the account's `exp claim says N days left (not checked live; see letify usage)`, or `EXPIRED` once `exp` has passed. An online check additionally calls `GetCurrentUser`, the same call the login proved the cookie with, and is made once per session start (`open_channel`) and once per `letify usage` read, each result trusted for sixty seconds so starting several runtimes together costs one round trip rather than one per runtime. A run whose cookie fails either check is refused with `ConfigError`: missing or past `exp` says exactly that; refused online says "the Kaggle cookie has not expired, but Kaggle no longer accepts it", which is the one fact that check establishes, never a guess at why. A run is also refused when fewer than one hour is left on the `exp` claim, since starting a session the claim says the cookie cannot outlive risks it dying mid run with no way to tell that apart from any other lost runtime; this offline guard and the online check both have to pass.
296
296
  - **A refused session can answer HTTP 400 with an empty body.** When the `XSRF-TOKEN` cookie in the stored cookie is no longer the one Kaggle issued for the session, `GetCurrentUser` answers HTTP 400, 401 or 403 instead of an empty account. The online check treats those three statuses as Kaggle refusing the cookie and reports `the Kaggle cookie was refused (HTTP <status>)` with the instruction to log in again. Any other HTTP status, such as 500, and any transport failure is not an answer about the cookie: the check reports `the Kaggle cookie could not be checked: HTTP <status>` or the exception class name, and the run fails as an infrastructure failure rather than as a bad cookie.
@@ -361,7 +361,7 @@ it leaves it calling a runtime that is gone. So the line names the way out, `sen
361
361
  process that started it, which letify handles by closing its sessions`, and then what `--orphans` is
362
362
  for. A bare `stop` otherwise reads as ending everything. The command lists what it will delete and asks before deleting, `-y` answers yes, and `--alias` limits it to one account. Each ref is deleted with the same CLI call `stop` uses and dropped from the record only when the delete succeeds, so a failure leaves the ref to be tried again rather than losing track of it. The exit status is 1 when any delete failed.
363
363
 
364
- **Deleting the notebook, through the CLI only.** `stop` deletes the notebook with the official CLI, `kaggle kernels delete -y <username>/<slug>`, authenticated by the account's API token in `KAGGLE_API_TOKEN`; deletion of a notebook created for a cookie-authenticated interactive session is confirmed on the live account. The cookie is never asked, not even as a fallback, because deleting a notebook is not part of running or ending the interactive session. The call never fails the runtime, because the accelerator quota is already released by cancelling the run before it is tried. When it cannot run at all, for want of a token, of uv, or of the slug Kaggle did not return, or when the command itself fails, `stop` prints one warning line naming the notebook by its slug or id, never its cookie, so the user can delete it by hand on kaggle.com. The chain that starts the session, all on `https://www.kaggle.com/api/i/`, authenticated by the cookie:
364
+ **Deleting the notebook, through the CLI only.** `stop` deletes the notebook with the official CLI, `kaggle kernels delete -y <username>/<slug>`, authenticated by the account's API token in `KAGGLE_API_TOKEN`; deletion of a notebook created for a cookie-authenticated interactive session is confirmed on the live account. The cookie is never asked, not even as a fallback, because deleting a notebook is not part of running or ending the interactive session. The call never fails the runtime, because the accelerator quota is already released by cancelling the run before it is tried. When it cannot run at all, for want of a token, of uv, or of the slug Kaggle did not return, or when the command itself fails, `stop` prints one warning line naming the notebook by its slug or id, never its cookie, so the user can delete it by hand on kaggle.com. When the command ran and failed, the warning also carries the first nonblank line of the CLI's standard error, which holds the HTTP status and Kaggle's reason, for example `403 Client Error: Forbidden for url: .../DeleteKernel`, and when that line contains `403` it adds that Kaggle refused the notebook `<owner>/<slug>`, that the owner must be the Kaggle username and not an email, and the fix command `letify login kaggle <alias> --replace --username <username>`. The cause measured on 2026-11-08 on account `kaggle_60` was the stored owner being the owner's email address: `kaggle kernels delete`, `status` and `pull` answered 403 while `kernels list --mine` succeeded with the same token, and deleting the same three notebooks with the Kaggle username succeeded with that token. The chain that starts the session, all on `https://www.kaggle.com/api/i/`, authenticated by the cookie:
365
365
 
366
366
  1. `GetOrCreateKernelSession {kernelId}` reads the notebook's draft sequence.
367
367
  2. `CommitAndRun` commits a trivial notebook body and starts the interactive session, returning the run id. This is what the editor's Run does. `CreateKernelSession` on an empty notebook wedges it, so `CommitAndRun` is the call that reliably starts a session letify controls. Empty compute is a CPU session; an accelerator name (`NVIDIA_TESLA_T4`) asks for that card.
@@ -70,7 +70,7 @@ distributed: Final = Host.distributed
70
70
  # The enum class stays importable from letify.declare.instance for letify's own use.
71
71
  del Host
72
72
 
73
- __version__ = "3.0.0"
73
+ __version__ = "3.0.2"
74
74
 
75
75
 
76
76
  def fetch(tensor): # type: ignore[no-untyped-def]
@@ -840,6 +840,7 @@ def read_kaggle_token(
840
840
  username = (given_username or "").strip()
841
841
  if not username and answers.interactive:
842
842
  username = read_line(KAGGLE_OWNER_PROMPT).strip()
843
+ from ..providers import kaggle as kg
843
844
  from ..providers.kaggle import read_api_token
844
845
 
845
846
  stored = read_api_token(answers.alias)
@@ -856,6 +857,9 @@ def read_kaggle_token(
856
857
  f"{answers.alias} needs the Kaggle API token and notebook owner: pass "
857
858
  f"--username <owner> and --key <KGAT_token> from kaggle.com, or drop --no-input."
858
859
  )
860
+ refusal = kg.owner_refusal(username)
861
+ if refusal is not None:
862
+ raise LoginError(f"{answers.alias}: {refusal}")
859
863
  if not key.startswith("KGAT_") or len(key) <= len("KGAT_") or any(
860
864
  character.isspace() for character in key
861
865
  ):
@@ -590,6 +590,30 @@ def read_notebook_owner(alias: str) -> str | None:
590
590
  return owner or None
591
591
 
592
592
 
593
+ def owner_refusal(owner: str) -> str | None:
594
+ """Say why ``owner`` cannot be a Kaggle username, or return None when it can.
595
+
596
+ Spec "Kaggle" token input and notebook owner: only ``@``, whitespace and ``/`` are
597
+ refused, because the spec states no fuller charset rule.
598
+ """
599
+ if "@" in owner:
600
+ return (
601
+ f"{owner} looks like an email address; enter the Kaggle username shown in "
602
+ f"your profile URL kaggle.com/<username>"
603
+ )
604
+ if "/" in owner or any(character.isspace() for character in owner):
605
+ return (
606
+ f"{owner} is not a Kaggle username; enter the username shown in your "
607
+ f"profile URL kaggle.com/<username>, with no whitespace or slash"
608
+ )
609
+ return None
610
+
611
+
612
+ def owner_fix_command(alias: str) -> str:
613
+ """The command that replaces a wrong stored owner and keeps the credentials."""
614
+ return f"letify login kaggle {alias} --replace --username <username>"
615
+
616
+
593
617
  def notebook_record(alias: str) -> Path:
594
618
  """Where the refs of the notebooks letify created on this account are kept."""
595
619
  return account_directory(alias) / "notebooks"
@@ -812,26 +836,27 @@ def list_notebooks_via_cli(alias: str) -> list[str]:
812
836
  return live
813
837
 
814
838
 
815
- def delete_notebook_via_cli(alias: str, slug: str | None) -> bool:
816
- """Delete the ephemeral notebook through the official CLI, the only way it is deleted.
839
+ def delete_notebook_failure(alias: str, slug: str | None) -> str | None:
840
+ """Delete the ephemeral notebook through the official CLI; None on success, else why not.
817
841
 
818
842
  Spec "Kaggle session token chain": the cookie is for the interactive session alone, so
819
- deleting the notebook afterward never touches it, win or lose. Returns whether the
820
- command exited 0; never raises, because the accelerator quota is already released by
821
- cancelling the run, and a notebook this call fails to delete is not a new failure for
822
- the runtime that just ended.
843
+ deleting the notebook afterward never touches it, win or lose. Never raises, because the
844
+ accelerator quota is already released by cancelling the run, and a notebook this call
845
+ fails to delete is not a new failure for the runtime that just ended. The reason is the
846
+ first nonblank line of the CLI's standard error when the command ran and failed, which
847
+ carries the HTTP status and Kaggle's words, and an empty string when it could not run.
823
848
  """
824
849
  if not slug:
825
- return False
850
+ return ""
826
851
  token = read_api_token(alias)
827
852
  if token is None:
828
- return False
853
+ return ""
829
854
  username = read_notebook_owner(alias)
830
855
  if username is None:
831
- return False
856
+ return ""
832
857
  uv = tools.find_uv()
833
858
  if uv is None:
834
- return False
859
+ return ""
835
860
  import subprocess
836
861
 
837
862
  try:
@@ -841,9 +866,21 @@ def delete_notebook_via_cli(alias: str, slug: str | None) -> bool:
841
866
  capture_output=True,
842
867
  timeout=REST_TIMEOUT,
843
868
  )
844
- except (OSError, subprocess.SubprocessError):
845
- return False
846
- return result.returncode == 0
869
+ except (OSError, subprocess.SubprocessError) as exc:
870
+ return type(exc).__name__
871
+ if result.returncode == 0:
872
+ return None
873
+ stderr = result.stderr
874
+ if isinstance(stderr, bytes):
875
+ stderr = stderr.decode("utf-8", "replace")
876
+ lines = [line.strip() for line in (stderr or "").splitlines() if line.strip()]
877
+ reason = lines[0].replace(token, "***") if lines else f"exit code {result.returncode}"
878
+ return reason
879
+
880
+
881
+ def delete_notebook_via_cli(alias: str, slug: str | None) -> bool:
882
+ """Whether the CLI deleted the notebook. See ``delete_notebook_failure``."""
883
+ return delete_notebook_failure(alias, slug) is None
847
884
 
848
885
 
849
886
  def delete_notebook_best_effort(alias: str, kernel_id: int, slug: str | None) -> None:
@@ -851,17 +888,27 @@ def delete_notebook_best_effort(alias: str, kernel_id: int, slug: str | None) ->
851
888
 
852
889
  Never raises. A notebook the CLI could not delete, for want of a token, of uv, of a
853
890
  slug, or because the command itself failed, is reported with a warning naming it by
854
- slug or id, never by its cookie, so the user can delete it by hand on kaggle.com.
891
+ slug or id, never by its cookie, so the user can delete it by hand on kaggle.com. A
892
+ command that ran and failed adds what the CLI said, and a 403 adds that the owner must be
893
+ the Kaggle username, not an email, with the command that fixes it.
855
894
  """
856
- if delete_notebook_via_cli(alias, slug):
895
+ reason = delete_notebook_failure(alias, slug)
896
+ if reason is None:
857
897
  forget_notebook(alias, slug)
858
898
  return
859
899
  import sys
860
900
 
861
901
  name = f"slug {slug}" if slug else f"id {kernel_id}"
902
+ detail = f": {reason}" if reason else ""
903
+ if "403" in reason:
904
+ owner = read_notebook_owner(alias) or "<owner>"
905
+ detail += (
906
+ f". Kaggle refused the notebook {owner}/{slug or kernel_id}; the owner must be "
907
+ f"the Kaggle username, not an email. Fix it with: {owner_fix_command(alias)}"
908
+ )
862
909
  print(
863
- f"letify: {alias}: could not delete the Kaggle notebook ({name}); delete it by hand "
864
- f"on kaggle.com",
910
+ f"letify: {alias}: could not delete the Kaggle notebook ({name}){detail}; delete it "
911
+ f"by hand on kaggle.com",
865
912
  file=sys.stderr,
866
913
  )
867
914
 
@@ -1699,11 +1746,18 @@ class Kaggle(Provider):
1699
1746
  The notebook is created fresh for this runtime alone, never reused from an earlier
1700
1747
  one: spec "Kaggle session token chain".
1701
1748
  """
1702
- if read_notebook_owner(self.alias) is None:
1749
+ owner = read_notebook_owner(self.alias)
1750
+ if owner is None:
1703
1751
  raise ConfigError(
1704
1752
  f"{self.alias} has no Kaggle notebook owner. Log in again with: "
1705
1753
  f"letify login kaggle {self.alias} --username <owner>"
1706
1754
  )
1755
+ refusal = owner_refusal(owner)
1756
+ if refusal is not None:
1757
+ raise ConfigError(
1758
+ f"{self.alias}: the stored notebook owner is wrong: {refusal}. "
1759
+ f"Fix it with: {owner_fix_command(self.alias)}"
1760
+ )
1707
1761
  cookie = self._require_live_cookie()
1708
1762
  self._leave_a_gap()
1709
1763
  instance = getattr(runtime, "instance", None)
@@ -1823,6 +1877,7 @@ __all__ = [
1823
1877
  "cookie_expiry",
1824
1878
  "cookie_headers",
1825
1879
  "delete_notebook_best_effort",
1880
+ "delete_notebook_failure",
1826
1881
  "delete_notebook_via_cli",
1827
1882
  "live_session_url",
1828
1883
  "read_api_token",
@@ -396,11 +396,11 @@ dependencies = [
396
396
 
397
397
  [[package]]
398
398
  name = "letify"
399
- version = "3.0.0"
399
+ version = "3.0.2"
400
400
 
401
401
  [[package]]
402
402
  name = "letify-link"
403
- version = "3.0.0"
403
+ version = "3.0.2"
404
404
  dependencies = [
405
405
  "ed25519-dalek",
406
406
  "getrandom 0.2.17",
@@ -8,7 +8,7 @@ resolver = "3"
8
8
  members = ["letify", "letify-link"]
9
9
 
10
10
  [workspace.package]
11
- version = "3.0.0"
11
+ version = "3.0.2"
12
12
  edition = "2024"
13
13
  license = "MIT"
14
14
  repository = "https://github.com/DarkPyonix/letify"
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "letify-status",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "letify-status",
9
- "version": "3.0.0",
9
+ "version": "3.0.2",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "devDependencies": {
12
12
  "@types/node": "^18.19.0",
@@ -2,7 +2,7 @@
2
2
  "name": "letify-status",
3
3
  "displayName": "letify Status",
4
4
  "description": "letify quota and GPU activity in the status bar, read from the letify CLI.",
5
- "version": "3.0.0",
5
+ "version": "3.0.2",
6
6
  "publisher": "darkpyonix",
7
7
  "license": "SEE LICENSE IN LICENSE",
8
8
  "repository": {
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "letify"
3
- version = "3.0.0"
3
+ version = "3.0.2"
4
4
  description = "Declarations that become infrastructure."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -2349,6 +2349,8 @@ class FakeKaggleCLI:
2349
2349
  self.calls: list[list[str]] = []
2350
2350
  self.environments: list[dict[str, str]] = []
2351
2351
  self.fail: set[str] = set()
2352
+ #: Standard error a failing command answers with.
2353
+ self.fail_stderr = "refused"
2352
2354
  #: Standard output a ``kernels list --csv`` call answers with. Kaggle names a
2353
2355
  #: notebook itself, so the titles are its own and the record is what tells
2354
2356
  #: letify's notebooks from the user's.
@@ -2386,7 +2388,7 @@ class FakeKaggleCLI:
2386
2388
  return FakeCompleted(returncode=1, stdout="", stderr="Authentication required")
2387
2389
  for marker in self.fail:
2388
2390
  if marker in command:
2389
- return FakeCompleted(returncode=1, stdout="", stderr="refused")
2391
+ return FakeCompleted(returncode=1, stdout="", stderr=self.fail_stderr)
2390
2392
  if "quota" in command:
2391
2393
  return FakeCompleted(returncode=0, stdout=self.quota_json, stderr="")
2392
2394
  if "list" in command:
@@ -141,6 +141,34 @@ def test_login_refuses_a_missing_owner_before_declaring_the_account(
141
141
  assert accept_cookie == []
142
142
 
143
143
 
144
+ @pytest.mark.parametrize("owner", ["me@gmail.com", "a b", "me/slug"])
145
+ def test_login_refuses_an_owner_that_is_not_a_kaggle_username(
146
+ isolated_home, accept_cookie, capsys, owner
147
+ ) -> None:
148
+ """Spec "Kaggle" token input and notebook owner: an email address is not an owner."""
149
+ assert main(["login", "kaggle", "kaggle_a", "--cookie", make_cookie(),
150
+ "--key", API_TOKEN, "--username", owner, "--no-input"]) == 1
151
+ err = capsys.readouterr().err
152
+ assert "kaggle.com/<username>" in err
153
+ assert not account("kaggle_a").exists()
154
+ assert not (Path.home() / ".letify" / "config.toml").exists()
155
+ assert accept_cookie == []
156
+
157
+
158
+ def test_a_session_with_a_stored_email_owner_is_refused_before_creating_a_notebook(
159
+ fake_kaggle
160
+ ) -> None:
161
+ """Spec "Kaggle" token input and notebook owner: a stored email owner names no notebook."""
162
+ from letify.errors import ConfigError
163
+
164
+ (account("kaggle_a") / "username").write_text("me@gmail.com", encoding="utf-8")
165
+ pattern = r"letify login kaggle kaggle_a --replace --username <username>"
166
+ with pytest.raises(ConfigError, match=pattern):
167
+ session_channel(fake_kaggle)
168
+ assert fake_kaggle.cloud_calls == []
169
+ assert fake_kaggle.kernels == set()
170
+
171
+
144
172
  def test_an_expired_cookie_is_refused_with_nothing_written(
145
173
  isolated_home, accept_cookie, capsys
146
174
  ) -> None:
@@ -947,6 +975,31 @@ def test_a_notebook_is_warned_about_by_name_when_the_cli_delete_fails(
947
975
  assert fake_kaggle.token not in err
948
976
 
949
977
 
978
+ def test_a_failed_cli_delete_warning_carries_the_http_status_and_reason(
979
+ fake_kaggle, fake_kaggle_cli, capsys
980
+ ) -> None:
981
+ """Spec "Kaggle session token chain": the warning names what the CLI said, so a token
982
+ that Kaggle refuses is told apart from a notebook that is already gone."""
983
+ fake_kaggle_cli.fail.add("delete")
984
+ fake_kaggle_cli.fail_stderr = (
985
+ "\n403 Client Error: Forbidden for url: "
986
+ "https://api.kaggle.com/v1/kernels.KernelsApiService/DeleteKernel\n\n"
987
+ "You don't have access to this resource.\n"
988
+ )
989
+ provider, runtime, _channel = session_channel(fake_kaggle)
990
+ provider.stop(runtime)
991
+
992
+ err = capsys.readouterr().err
993
+ assert "403 Client Error: Forbidden" in err
994
+ assert "DeleteKernel" in err
995
+ assert "irack000/" in err
996
+ assert "Kaggle username, not an email" in err
997
+ assert "letify login kaggle kaggle_a --replace --username <username>" in err
998
+ assert "lack" not in err
999
+ assert "delete it by hand" in err
1000
+ assert fake_kaggle.token not in err
1001
+
1002
+
950
1003
  def test_a_notebook_without_a_token_is_warned_about_not_deleted_via_the_cookie(
951
1004
  fake_kaggle, fake_kaggle_cli
952
1005
  ) -> None:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes