mystack-rig 1.11.0__tar.gz → 1.11.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 (167) hide show
  1. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/PKG-INFO +6 -4
  2. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/README.md +5 -3
  3. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/assets/tmux.conf +5 -0
  4. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/encrypt.py +11 -0
  5. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/live_agent.py +4 -1
  6. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/main.py +3 -1
  7. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/remote_dev.py +3 -3
  8. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_git/tasks/authorize.yml +26 -5
  9. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/mystack_rig.egg-info/PKG-INFO +6 -4
  10. mystack_rig-1.11.2/src/mystack_rig.egg-info/scm_version.json +8 -0
  11. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_git_credentials_and_author.py +91 -11
  12. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_live_agent.py +12 -0
  13. mystack_rig-1.11.0/src/mystack_rig.egg-info/scm_version.json +0 -8
  14. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/.coveragerc +0 -0
  15. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/.git-blame-ignore-revs +0 -0
  16. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/.github/workflows/release.yml +0 -0
  17. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/.github/workflows/tests.yml +0 -0
  18. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/.gitignore +0 -0
  19. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/CLAUDE.md +0 -0
  20. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/CLI_STORAGE_SUMMARY.md +0 -0
  21. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/Dockerfile +0 -0
  22. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/GIT_CLONE_FEATURE.md +0 -0
  23. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/GLOSSARY.md +0 -0
  24. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/HETZNER_STORAGE_GUIDE.md +0 -0
  25. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/HETZNER_STORAGE_SECURITY_GUIDE.md +0 -0
  26. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/LICENSE +0 -0
  27. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/Makefile +0 -0
  28. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/README_REAL_E2E.md +0 -0
  29. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/STORAGE_CLI_GUIDE.md +0 -0
  30. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/adr/0001-per-profile-generated-state-bucket.md +0 -0
  31. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/adr/0002-outputs-as-separate-object-via-file-handoff.md +0 -0
  32. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/adr/0003-mcp-servers-declared-once-rendered-at-authorize.md +0 -0
  33. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/adr/0004-agents-run-as-live-agents-in-tmux.md +0 -0
  34. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/adr/0005-docker-in-configure-for-devcontainers.md +0 -0
  35. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/adr/0006-workspace-user-instead-of-root.md +0 -0
  36. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/adr/0007-managed-playbook-content-ships-as-bundled-roles.md +0 -0
  37. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/architecture.md +0 -0
  38. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/architecture.png +0 -0
  39. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/architecture.svg +0 -0
  40. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/docs/roles.md +0 -0
  41. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/forged-idea.md +0 -0
  42. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/pyproject.toml +0 -0
  43. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/pytest.ini +0 -0
  44. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/requirements.txt +0 -0
  45. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/sample.env +0 -0
  46. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/scripts/coverage_badge.py +0 -0
  47. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/scripts/pypi_version.py +0 -0
  48. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/setup.cfg +0 -0
  49. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/__init__.py +0 -0
  50. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/__init__.py +0 -0
  51. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/__main__.py +0 -0
  52. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/agents.py +0 -0
  53. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/ansible_filters/__init__.py +0 -0
  54. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/ansible_filters/rig_live.py +0 -0
  55. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/ansible_filters/rig_mcp.py +0 -0
  56. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/assets/rig-agent-queue +0 -0
  57. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/assets/rig-agent-state +0 -0
  58. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/config.py +0 -0
  59. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/devcontainers.py +0 -0
  60. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/git.py +0 -0
  61. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/git_author.py +0 -0
  62. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/last_env.py +0 -0
  63. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/last_session.py +0 -0
  64. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/last_target.py +0 -0
  65. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/log.py +0 -0
  66. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/mcp.py +0 -0
  67. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/outputs.py +0 -0
  68. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/repos.py +0 -0
  69. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/requirements.txt +0 -0
  70. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_base/defaults/main.yml +0 -0
  71. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_base/tasks/install.yml +0 -0
  72. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_claude_code/defaults/main.yml +0 -0
  73. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_claude_code/tasks/authorize.yml +0 -0
  74. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_claude_code/tasks/install.yml +0 -0
  75. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_code_server/defaults/main.yml +0 -0
  76. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_code_server/tasks/authorize.yml +0 -0
  77. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_code_server/tasks/install.yml +0 -0
  78. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_cursor_cli/defaults/main.yml +0 -0
  79. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_cursor_cli/tasks/authorize.yml +0 -0
  80. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_cursor_cli/tasks/install.yml +0 -0
  81. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_destroy/defaults/main.yml +0 -0
  82. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_destroy/tasks/destroy.yml +0 -0
  83. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_git/defaults/main.yml +0 -0
  84. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_git/tasks/install.yml +0 -0
  85. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_home_ownership/defaults/main.yml +0 -0
  86. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_home_ownership/tasks/authorize.yml +0 -0
  87. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_home_ownership/tasks/install.yml +0 -0
  88. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_live_agent/defaults/main.yml +0 -0
  89. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_live_agent/tasks/authorize.yml +0 -0
  90. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_live_agent/tasks/install.yml +0 -0
  91. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_mcp/defaults/main.yml +0 -0
  92. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_mcp/tasks/authorize.yml +0 -0
  93. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_opencode/defaults/main.yml +0 -0
  94. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_opencode/tasks/authorize.yml +0 -0
  95. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_opencode/tasks/install.yml +0 -0
  96. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_workspace_repos/defaults/main.yml +0 -0
  97. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_workspace_repos/tasks/materialize.yml +0 -0
  98. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_workspace_user/defaults/main.yml +0 -0
  99. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_workspace_user/tasks/authorize.yml +0 -0
  100. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/roles/rig_workspace_user/tasks/install.yml +0 -0
  101. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/snapshots.py +0 -0
  102. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/state_bucket.py +0 -0
  103. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/storage.py +0 -0
  104. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/vault_keys.py +0 -0
  105. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/vpn.py +0 -0
  106. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/cli/workspace_user.py +0 -0
  107. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/mystack_rig.egg-info/SOURCES.txt +0 -0
  108. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/mystack_rig.egg-info/dependency_links.txt +0 -0
  109. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/mystack_rig.egg-info/entry_points.txt +0 -0
  110. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/mystack_rig.egg-info/requires.txt +0 -0
  111. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/mystack_rig.egg-info/scm_file_list.json +0 -0
  112. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/src/mystack_rig.egg-info/top_level.txt +0 -0
  113. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/test_hetzner_integration.py +0 -0
  114. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/_roles.py +0 -0
  115. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/conftest.py +0 -0
  116. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/fixtures/vpn-gateway.yml +0 -0
  117. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_agents.py +0 -0
  118. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_ansible_galaxy.py +0 -0
  119. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_attach_command.py +0 -0
  120. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_bundled_roles.py +0 -0
  121. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_credential_security.py +0 -0
  122. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_destroy_command.py +0 -0
  123. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_dev_command.py +0 -0
  124. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_devcontainers.py +0 -0
  125. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_encrypt_command.py +0 -0
  126. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_encrypt_coverage.py +0 -0
  127. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_firewall_client_ip.py +0 -0
  128. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_git_clone_unit.py +0 -0
  129. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_git_manager.py +0 -0
  130. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_gitignore_init.py +0 -0
  131. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_hetzner_storage.py +0 -0
  132. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_init_command.py +0 -0
  133. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_inspect_describe.py +0 -0
  134. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_last_env.py +0 -0
  135. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_last_session.py +0 -0
  136. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_last_target.py +0 -0
  137. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_live_agent_cli.py +0 -0
  138. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_log.py +0 -0
  139. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_main_coverage.py +0 -0
  140. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_mcp_command.py +0 -0
  141. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_mcp_render.py +0 -0
  142. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_outputs.py +0 -0
  143. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_outputs_storage.py +0 -0
  144. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_pypi_version.py +0 -0
  145. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_python_floor.py +0 -0
  146. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_r2_storage.py +0 -0
  147. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_real_e2e_integration.py +0 -0
  148. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_real_e2e_storage.py +0 -0
  149. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_real_e2e_vpn.py +0 -0
  150. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_real_e2e_vpn_tunnel.py +0 -0
  151. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_remote_dev.py +0 -0
  152. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_remote_dev_coverage_extensions.py +0 -0
  153. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_repo_command.py +0 -0
  154. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_rig_ansible_vars.py +0 -0
  155. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_rig_config.py +0 -0
  156. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_run_remote_decoding.py +0 -0
  157. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_secret_prompt_hidden.py +0 -0
  158. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_setup_provision.py +0 -0
  159. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_simulation_storage.py +0 -0
  160. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_small_module_coverage.py +0 -0
  161. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_snapshots.py +0 -0
  162. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_state_bucket.py +0 -0
  163. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_storage_basic.py +0 -0
  164. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_vault_keys.py +0 -0
  165. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_vpn_optional.py +0 -0
  166. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_vpn_unit.py +0 -0
  167. {mystack_rig-1.11.0 → mystack_rig-1.11.2}/tests/test_workspace_git_clone.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mystack-rig
3
- Version: 1.11.0
3
+ Version: 1.11.2
4
4
  Summary: Ephemeral remotes with full local parity for coding agents
5
5
  Author: mystack-cloud
6
6
  License-Expression: MIT
@@ -117,7 +117,7 @@ rig mcp remove awx
117
117
 
118
118
  ```bash
119
119
  rig attach # start the live agent, or join the running one
120
- # leave: close the terminal, or detach with Ctrl+b d. Ctrl+C still goes to the agent.
120
+ # leave: close the terminal, or detach with Ctrl+b d (Ctrl+b Ctrl+d works too) or Ctrl+\. Ctrl+C still goes to the agent.
121
121
  rig attach --restart # replace it with a fresh process (resumes the same conversation)
122
122
  rig attach --no-persist # old behaviour: the agent ends with the SSH session
123
123
  ```
@@ -494,8 +494,10 @@ MIT
494
494
  box in both;
495
495
  - a system-wide git credential helper (`/usr/local/bin/rig-git-credential`)
496
496
  answers `github.com` / `gitlab.com` HTTPS requests from that same file (and, for a
497
- Repo with its own `password_var` such as `<project>_git_pat`, requests to that
498
- Repo's host from `~/.config/rig/git-hosts`), so
497
+ Repo with its own `password_var` such as `<project>_git_pat`, requests for
498
+ that Repo's `group/project` from `~/.config/rig/git-hosts`; rig sets
499
+ `credential.useHttpPath` so two Repos on one host can carry different tokens,
500
+ and a Repo without its own token falls back to the provider token), so
499
501
  `git clone`, `git push` and the `materialize.yml` clone task all use plain
500
502
  URLs (`https://github.com/org/repo.git`) and nothing sits in `.git/config`
501
503
  or `git remote -v`. Other users on the VM (besides root) can't read the file and get no
@@ -95,7 +95,7 @@ rig mcp remove awx
95
95
 
96
96
  ```bash
97
97
  rig attach # start the live agent, or join the running one
98
- # leave: close the terminal, or detach with Ctrl+b d. Ctrl+C still goes to the agent.
98
+ # leave: close the terminal, or detach with Ctrl+b d (Ctrl+b Ctrl+d works too) or Ctrl+\. Ctrl+C still goes to the agent.
99
99
  rig attach --restart # replace it with a fresh process (resumes the same conversation)
100
100
  rig attach --no-persist # old behaviour: the agent ends with the SSH session
101
101
  ```
@@ -472,8 +472,10 @@ MIT
472
472
  box in both;
473
473
  - a system-wide git credential helper (`/usr/local/bin/rig-git-credential`)
474
474
  answers `github.com` / `gitlab.com` HTTPS requests from that same file (and, for a
475
- Repo with its own `password_var` such as `<project>_git_pat`, requests to that
476
- Repo's host from `~/.config/rig/git-hosts`), so
475
+ Repo with its own `password_var` such as `<project>_git_pat`, requests for
476
+ that Repo's `group/project` from `~/.config/rig/git-hosts`; rig sets
477
+ `credential.useHttpPath` so two Repos on one host can carry different tokens,
478
+ and a Repo without its own token falls back to the provider token), so
477
479
  `git clone`, `git push` and the `materialize.yml` clone task all use plain
478
480
  URLs (`https://github.com/org/repo.git`) and nothing sits in `.git/config`
479
481
  or `git remote -v`. Other users on the VM (besides root) can't read the file and get no
@@ -25,3 +25,8 @@ set -g aggressive-resize on
25
25
  # Keep the pane when the agent fails so its error stays readable. `rig attach` and
26
26
  # `rig exec` replace a dead pane the next time.
27
27
  set -g remain-on-exit failed
28
+
29
+ # Ctrl+b d also detaches while Ctrl is still held (Ctrl+b Ctrl+d), which tmux leaves
30
+ # unbound. Ctrl+\ detaches with no prefix. Ctrl+C goes to the agent and stops it.
31
+ bind C-d detach-client
32
+ bind -n 'C-\' detach-client
@@ -410,6 +410,17 @@ def _git_host(url: str) -> str:
410
410
  return match.group(1) if match else ""
411
411
 
412
412
 
413
+ def git_repo_path(url: str) -> str:
414
+ """Lower-cased ``group/project`` of an https:// remote ("" if there is none).
415
+
416
+ The leading slash and a trailing ``.git`` are dropped, matching how the
417
+ credential helper normalises the ``path`` git sends it.
418
+ """
419
+ match = re.match(r"^[a-z+]+://(?:[^@/]+@)?[^/]+/(.*)$", (url or "").strip().lower())
420
+ path = match.group(1).strip("/") if match else ""
421
+ return path[: -len(".git")] if path.endswith(".git") else path
422
+
423
+
413
424
  def detect_git_provider(url: str) -> str | None:
414
425
  """Return 'github' or 'gitlab' for a remote URL.
415
426
 
@@ -134,7 +134,10 @@ def attach_script(agent: str, launch_cmd: str, **kwargs: object) -> str:
134
134
  socket = str(kwargs.get("socket", TMUX_SOCKET))
135
135
  conf = str(kwargs.get("conf", TMUX_CONF))
136
136
  body = ensure_session_script(agent, launch_cmd, **kwargs) # type: ignore[arg-type]
137
- return f'{body}\nexec {_tmux(socket, conf)} attach-session -t "{session_name(agent)}"'
137
+ tmux = _tmux(socket, conf)
138
+ # -f is read only when the server starts; reload so a running agent gets the current keys.
139
+ reload = f"{tmux} source-file {shlex.quote(conf)} 2>/dev/null || true"
140
+ return f'{body}\n{reload}\nexec {tmux} attach-session -t "{session_name(agent)}"'
138
141
 
139
142
 
140
143
  def verify_started_script(
@@ -318,7 +318,9 @@ def _cmd_attach(args: argparse.Namespace) -> int:
318
318
  if agent_args:
319
319
  log.debug("Agent args: %s", " ".join(agent_args))
320
320
  if persist:
321
- log.info("The agent keeps running when you leave: detach with Ctrl+b d, or just close the terminal")
321
+ log.info(
322
+ "The agent keeps running when you leave: detach with Ctrl+b d (Ctrl+b Ctrl+d works too) or Ctrl+\\, or just close the terminal"
323
+ )
322
324
  return env.attach_to_agent(
323
325
  project_dir=os.getcwd(),
324
326
  agent_type=str(agent_type),
@@ -715,7 +715,7 @@ def build_rig_ansible_vars(
715
715
 
716
716
 
717
717
  def git_repo_token_vars(project: Any) -> list[dict[str, str]]:
718
- """``{host, user, var}`` for each HTTPS clone Repo that has its own ``password_var``.
718
+ """``{host, path, user, var}`` for each HTTPS clone Repo that has its own ``password_var``.
719
719
 
720
720
  Only the variable *name* is passed on; authorize resolves the secret, so a
721
721
  PAT stored per Repo (``<project>_git_pat``) reaches the VM's git credential
@@ -723,7 +723,7 @@ def git_repo_token_vars(project: Any) -> list[dict[str, str]]:
723
723
  """
724
724
  if project is None:
725
725
  return []
726
- from cli.encrypt import _git_host, detect_git_provider
726
+ from cli.encrypt import _git_host, detect_git_provider, git_repo_path
727
727
 
728
728
  found: list[dict[str, str]] = []
729
729
  for item in (project.get_vars("git") or {}).get("clone_repos") or []:
@@ -734,7 +734,7 @@ def git_repo_token_vars(project: Any) -> list[dict[str, str]]:
734
734
  if not (repo.startswith("https://") and var and host):
735
735
  continue
736
736
  user = "x-access-token" if detect_git_provider(repo) == "github" else "oauth2"
737
- entry = {"host": host, "user": user, "var": var}
737
+ entry = {"host": host, "path": git_repo_path(repo), "user": user, "var": var}
738
738
  if entry not in found:
739
739
  found.append(entry)
740
740
  return found
@@ -48,7 +48,9 @@
48
48
  {% endif %}
49
49
  no_log: true
50
50
  # PATs stored per Repo (password_var, e.g. <project>_git_pat): one
51
- # "host user token" line each, for the credential helper below.
51
+ # "host path user token" line each, for the credential helper below.
52
+ # path is the Repo's group/project ("-" matches every Repo on the host),
53
+ # so two Repos on one host can carry different tokens.
52
54
  - name: Write the per-repo token file (workspace user only)
53
55
  copy:
54
56
  dest: /home/{{ rig_user }}/.config/rig/git-hosts
@@ -58,7 +60,7 @@
58
60
  {% for t in rig_git_repo_tokens | default([]) %}
59
61
  {% set _tok = lookup('vars', t.var, default='') %}
60
62
  {% if _tok | length > 0 %}
61
- {{ t.host }} {{ t.user }} {{ _tok }}
63
+ {{ t.host }} {{ t.path | default('-', true) }} {{ t.user }} {{ _tok }}
62
64
  {% endif %}
63
65
  {% endfor %}
64
66
  no_log: true
@@ -83,19 +85,32 @@
83
85
  # the workspace user (and root) can read it; anyone else gets no answer.
84
86
  [ "$1" = get ] || exit 0
85
87
  host=""
88
+ path=""
86
89
  while IFS='=' read -r key value; do
87
90
  [ -z "$key" ] && break
88
91
  [ "$key" = host ] && host="$value"
92
+ [ "$key" = path ] && path="$value"
89
93
  done
90
- # A token stored for this exact host (per-Repo password_var) wins.
94
+ # A token stored for this Repo (per-Repo password_var) wins, then a
95
+ # host-wide one ("-" path); otherwise the provider token below.
96
+ # git only sends path= when credential.useHttpPath is true.
97
+ repo=$(printf '%s' "$path" | tr 'A-Z' 'a-z')
98
+ repo="${repo#/}"; repo="${repo%/}"; repo="${repo%.git}"
91
99
  hosts=/home/{{ rig_user }}/.config/rig/git-hosts
92
100
  if [ -r "$hosts" ]; then
93
- while read -r h u p; do
94
- if [ "$h" = "$host" ] && [ -n "$p" ]; then
101
+ anyhost=""
102
+ while read -r h rp u p; do
103
+ [ "$h" = "$host" ] && [ -n "$p" ] || continue
104
+ if [ "$rp" = "$repo" ] && [ -n "$repo" ]; then
95
105
  printf 'username=%s\npassword=%s\n' "$u" "$p"
96
106
  exit 0
97
107
  fi
108
+ if [ "$rp" = "-" ] && [ -z "$anyhost" ]; then anyhost="$u $p"; fi
98
109
  done < "$hosts"
110
+ if [ -n "$anyhost" ]; then
111
+ printf 'username=%s\npassword=%s\n' "${anyhost%% *}" "${anyhost#* }"
112
+ exit 0
113
+ fi
99
114
  fi
100
115
  [ -r /home/{{ rig_user }}/.config/rig/git-provider.env ] || exit 0
101
116
  . /home/{{ rig_user }}/.config/rig/git-provider.env
@@ -110,4 +125,10 @@
110
125
  command:
111
126
  argv: ["git", "config", "--system", "credential.helper", "/usr/local/bin/rig-git-credential"]
112
127
  changed_when: false
128
+ # Without this git sends only the host, so two Repos on one host would
129
+ # share a token.
130
+ - name: Send the repo path with every git credential lookup
131
+ command:
132
+ argv: ["git", "config", "--system", "credential.useHttpPath", "true"]
133
+ changed_when: false
113
134
  tags: [rig_git_provider_tokens, credentials, git]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mystack-rig
3
- Version: 1.11.0
3
+ Version: 1.11.2
4
4
  Summary: Ephemeral remotes with full local parity for coding agents
5
5
  Author: mystack-cloud
6
6
  License-Expression: MIT
@@ -117,7 +117,7 @@ rig mcp remove awx
117
117
 
118
118
  ```bash
119
119
  rig attach # start the live agent, or join the running one
120
- # leave: close the terminal, or detach with Ctrl+b d. Ctrl+C still goes to the agent.
120
+ # leave: close the terminal, or detach with Ctrl+b d (Ctrl+b Ctrl+d works too) or Ctrl+\. Ctrl+C still goes to the agent.
121
121
  rig attach --restart # replace it with a fresh process (resumes the same conversation)
122
122
  rig attach --no-persist # old behaviour: the agent ends with the SSH session
123
123
  ```
@@ -494,8 +494,10 @@ MIT
494
494
  box in both;
495
495
  - a system-wide git credential helper (`/usr/local/bin/rig-git-credential`)
496
496
  answers `github.com` / `gitlab.com` HTTPS requests from that same file (and, for a
497
- Repo with its own `password_var` such as `<project>_git_pat`, requests to that
498
- Repo's host from `~/.config/rig/git-hosts`), so
497
+ Repo with its own `password_var` such as `<project>_git_pat`, requests for
498
+ that Repo's `group/project` from `~/.config/rig/git-hosts`; rig sets
499
+ `credential.useHttpPath` so two Repos on one host can carry different tokens,
500
+ and a Repo without its own token falls back to the provider token), so
499
501
  `git clone`, `git push` and the `materialize.yml` clone task all use plain
500
502
  URLs (`https://github.com/org/repo.git`) and nothing sits in `.git/config`
501
503
  or `git remote -v`. Other users on the VM (besides root) can't read the file and get no
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "1.11.2",
3
+ "distance": 0,
4
+ "node": "g2fac6c047c0887e227f8c3c945b8e817eac32949",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-12-03"
8
+ }
@@ -219,10 +219,11 @@ def _helper_script(tmp_path):
219
219
  return script, token_file
220
220
 
221
221
 
222
- def _ask(script, op, host):
222
+ def _ask(script, op, host, path=None):
223
+ extra = f"path={path}\n" if path is not None else ""
223
224
  return subprocess.run(
224
225
  [str(script), op],
225
- input=f"protocol=https\nhost={host}\n\n",
226
+ input=f"protocol=https\nhost={host}\n{extra}\n",
226
227
  capture_output=True,
227
228
  text=True,
228
229
  check=True,
@@ -251,7 +252,7 @@ def test_helper_stays_silent_when_it_has_nothing_to_say(tmp_path):
251
252
  def test_helper_serves_a_per_repo_token_for_its_host(tmp_path):
252
253
  """A PAT stored per Repo (password_var) answers git pull, even on a host rig can't classify."""
253
254
  script, token_file = _helper_script(tmp_path)
254
- (tmp_path / "git-hosts").write_text("git.corp.example oauth2 glpat-repo\ngitlab.com oauth2 glpat-own\n")
255
+ (tmp_path / "git-hosts").write_text("git.corp.example - oauth2 glpat-repo\ngitlab.com - oauth2 glpat-own\n")
255
256
  token_file.write_text("GITLAB_TOKEN=glpat-default\n")
256
257
 
257
258
  assert _ask(script, "get", "git.corp.example") == "username=oauth2\npassword=glpat-repo\n"
@@ -261,7 +262,7 @@ def test_helper_serves_a_per_repo_token_for_its_host(tmp_path):
261
262
 
262
263
  def test_helper_without_provider_file_still_serves_per_repo_token(tmp_path):
263
264
  script, _token_file = _helper_script(tmp_path)
264
- (tmp_path / "git-hosts").write_text("gitlab.com oauth2 glpat-own\n")
265
+ (tmp_path / "git-hosts").write_text("gitlab.com - oauth2 glpat-own\n")
265
266
 
266
267
  assert _ask(script, "get", "gitlab.com") == "username=oauth2\npassword=glpat-own\n"
267
268
 
@@ -277,11 +278,11 @@ def test_authorize_writes_per_repo_tokens_from_their_vars():
277
278
  rendered = template.render(
278
279
  lookup=lambda _kind, name, default="": secrets.get(name, default),
279
280
  rig_git_repo_tokens=[
280
- {"host": "gitlab.com", "user": "oauth2", "var": "p_git_pat"},
281
- {"host": "x.example", "user": "oauth2", "var": "unset"},
281
+ {"host": "gitlab.com", "path": "g/p", "user": "oauth2", "var": "p_git_pat"},
282
+ {"host": "x.example", "path": "g/q", "user": "oauth2", "var": "unset"},
282
283
  ],
283
284
  )
284
- assert [ln for ln in rendered.splitlines() if ln.strip()][1:] == ["gitlab.com oauth2 glpat-1"]
285
+ assert [ln for ln in rendered.splitlines() if ln.strip()][1:] == ["gitlab.com g/p oauth2 glpat-1"]
285
286
  assert next(t for t in _authorize_tasks() if t["name"] == "Provider tokens for git, gh and glab")["when"].count(
286
287
  "rig_git_repo_tokens"
287
288
  )
@@ -300,7 +301,7 @@ def test_token_files_are_never_empty_when_no_token_is_set():
300
301
  lookup=lambda _kind, _name, default="": default,
301
302
  _rig_gh_token="",
302
303
  _rig_gl_token="",
303
- rig_git_repo_tokens=[{"host": "gitlab.com", "user": "oauth2", "var": "p_git_pat"}],
304
+ rig_git_repo_tokens=[{"host": "gitlab.com", "path": "g/p", "user": "oauth2", "var": "p_git_pat"}],
304
305
  )
305
306
  assert rendered.strip() == "# managed by rig"
306
307
 
@@ -324,13 +325,58 @@ def test_git_repo_token_vars_lists_https_repos_with_their_own_password_var():
324
325
  }
325
326
 
326
327
  assert git_repo_token_vars(Project()) == [
327
- {"host": "gitlab.com", "user": "oauth2", "var": "a_git_pat"},
328
- {"host": "github.com", "user": "x-access-token", "var": "b_git_pat"},
329
- {"host": "git.corp.example", "user": "oauth2", "var": "c_git_pat"},
328
+ {"host": "gitlab.com", "path": "o/a", "user": "oauth2", "var": "a_git_pat"},
329
+ {"host": "gitlab.com", "path": "o/a2", "user": "oauth2", "var": "a_git_pat"},
330
+ {"host": "github.com", "path": "o/b", "user": "x-access-token", "var": "b_git_pat"},
331
+ {"host": "git.corp.example", "path": "o/c", "user": "oauth2", "var": "c_git_pat"},
330
332
  ]
331
333
  assert git_repo_token_vars(None) == []
332
334
 
333
335
 
336
+ def test_helper_serves_a_different_token_per_repo_on_one_host(tmp_path):
337
+ """Three Repos on one GitLab host, one token each; the provider token covers the rest."""
338
+ script, token_file = _helper_script(tmp_path)
339
+ (tmp_path / "git-hosts").write_text(
340
+ "gitlab.boxine.de grp/one oauth2 tok-1055\n"
341
+ "gitlab.boxine.de grp/two oauth2 tok-2000\n"
342
+ "gitlab.boxine.de grp/three oauth2 tok-3000\n"
343
+ )
344
+ token_file.write_text("GITLAB_TOKEN=tok-1127\n")
345
+ host = "gitlab.boxine.de"
346
+
347
+ assert _ask(script, "get", host, "grp/one.git") == "username=oauth2\npassword=tok-1055\n"
348
+ assert _ask(script, "get", host, "grp/two.git") == "username=oauth2\npassword=tok-2000\n"
349
+ assert _ask(script, "get", host, "Grp/Three") == "username=oauth2\npassword=tok-3000\n"
350
+ # No entry for this Repo: the provider token, not the first match on the host.
351
+ assert _ask(script, "get", host, "grp/review-agent.git") == "username=oauth2\npassword=tok-1127\n"
352
+ # git without useHttpPath sends no path: same fallback.
353
+ assert _ask(script, "get", host) == "username=oauth2\npassword=tok-1127\n"
354
+
355
+
356
+ def test_helper_prefers_the_repo_token_over_a_host_wide_one(tmp_path):
357
+ script, token_file = _helper_script(tmp_path)
358
+ (tmp_path / "git-hosts").write_text("h.example - oauth2 tok-host\nh.example g/p oauth2 tok-repo\n")
359
+ token_file.write_text("GITLAB_TOKEN=tok-provider\n")
360
+
361
+ assert _ask(script, "get", "h.example", "g/p.git") == "username=oauth2\npassword=tok-repo\n"
362
+ assert _ask(script, "get", "h.example", "g/other.git") == "username=oauth2\npassword=tok-host\n"
363
+
364
+
365
+ def test_authorize_sends_the_repo_path_to_the_helper():
366
+ block = _provider_block()
367
+ task = next(t for t in block if t["name"].startswith("Send the repo path"))
368
+ assert task["command"]["argv"] == ["git", "config", "--system", "credential.useHttpPath", "true"]
369
+
370
+
371
+ def test_git_repo_path_normalises_clone_urls():
372
+ from cli.encrypt import git_repo_path
373
+
374
+ assert git_repo_path("https://gitlab.com/Grp/Proj.git") == "grp/proj"
375
+ assert git_repo_path("https://user@gitlab.com/grp/sub/proj/") == "grp/sub/proj"
376
+ assert git_repo_path("git@gitlab.com:grp/proj.git") == ""
377
+ assert git_repo_path("") == ""
378
+
379
+
334
380
  def test_helper_works_through_real_git(tmp_path):
335
381
  script, token_file = _helper_script(tmp_path)
336
382
  token_file.write_text("GH_TOKEN=ghp_abc\n")
@@ -355,6 +401,40 @@ def test_helper_works_through_real_git(tmp_path):
355
401
  assert "password=ghp_abc" in out
356
402
 
357
403
 
404
+ def test_real_git_picks_the_token_for_each_repo_url(tmp_path):
405
+ """With credential.useHttpPath, git passes the repo path and each URL gets its own token."""
406
+ script, token_file = _helper_script(tmp_path)
407
+ (tmp_path / "git-hosts").write_text(
408
+ "gitlab.example grp/one oauth2 tok-one\ngitlab.example grp/two oauth2 tok-two\n"
409
+ )
410
+ token_file.write_text("GITLAB_TOKEN=tok-provider\n")
411
+ env = {
412
+ **os.environ,
413
+ "GIT_CONFIG_NOSYSTEM": "1",
414
+ "GIT_CONFIG_GLOBAL": os.devnull,
415
+ "GIT_TERMINAL_PROMPT": "0",
416
+ "GIT_CONFIG_COUNT": "2",
417
+ "GIT_CONFIG_KEY_0": "credential.helper",
418
+ "GIT_CONFIG_VALUE_0": str(script),
419
+ "GIT_CONFIG_KEY_1": "credential.useHttpPath",
420
+ "GIT_CONFIG_VALUE_1": "true",
421
+ }
422
+
423
+ def fill(url):
424
+ return subprocess.run(
425
+ ["git", "credential", "fill"],
426
+ input=f"url={url}\n\n",
427
+ capture_output=True,
428
+ text=True,
429
+ env=env,
430
+ check=True,
431
+ ).stdout
432
+
433
+ assert "password=tok-one" in fill("https://gitlab.example/grp/one.git")
434
+ assert "password=tok-two" in fill("https://gitlab.example/grp/two.git")
435
+ assert "password=tok-provider" in fill("https://gitlab.example/grp/other.git")
436
+
437
+
358
438
  # --- the agent's non-login shell must get the tokens too ------------------------
359
439
 
360
440
 
@@ -625,3 +625,15 @@ def test_authorize_hands_live_agent_state_and_log_dirs_to_the_workspace_user():
625
625
  task = next(t for t in play["tasks"] if t.get("name", "").startswith("Let the workspace user write live-agent"))
626
626
  assert task["file"]["owner"] == "{{ rig_user }}"
627
627
  assert task["loop"] == [la.STATE_DIR, la.LOG_DIR]
628
+
629
+
630
+ def test_detach_keys_cover_ctrl_still_held_and_no_prefix():
631
+ conf = open(CONF).read()
632
+ assert "bind C-d detach-client" in conf # Ctrl+b, then d typed with Ctrl still held
633
+ assert "bind -n 'C-\\' detach-client" in conf # no prefix needed
634
+
635
+
636
+ def test_attach_reloads_the_config_into_a_running_server():
637
+ lines = la.attach_script("claude", "exec claude").splitlines()
638
+ assert lines[-2].startswith("tmux -L rig") and "source-file /etc/rig/tmux.conf" in lines[-2]
639
+ assert lines[-1].startswith("exec tmux")
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "1.11.0",
3
- "distance": 0,
4
- "node": "ga24c027dafb7cf8b78a88532f91e70dc5c381b62",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-12-02"
8
- }
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