terok 0.8.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.
Files changed (171) hide show
  1. terok-0.8.0/LICENSE +177 -0
  2. terok-0.8.0/LICENSES/Apache-2.0.txt +202 -0
  3. terok-0.8.0/PKG-INFO +265 -0
  4. terok-0.8.0/README.md +215 -0
  5. terok-0.8.0/completions/terok +8 -0
  6. terok-0.8.0/docs/agent-compat-matrix.md +148 -0
  7. terok-0.8.0/docs/concepts.md +577 -0
  8. terok-0.8.0/docs/container-layers.md +77 -0
  9. terok-0.8.0/docs/container-lifecycle.md +228 -0
  10. terok-0.8.0/docs/developer.md +677 -0
  11. terok-0.8.0/docs/docker.md +152 -0
  12. terok-0.8.0/docs/git-gate-and-security-modes.md +196 -0
  13. terok-0.8.0/docs/index.md +130 -0
  14. terok-0.8.0/docs/kernel-keyring.md +76 -0
  15. terok-0.8.0/docs/login-design.md +111 -0
  16. terok-0.8.0/docs/runtimes.md +90 -0
  17. terok-0.8.0/docs/selinux.md +97 -0
  18. terok-0.8.0/docs/shared-dirs.md +134 -0
  19. terok-0.8.0/docs/shield-security.md +134 -0
  20. terok-0.8.0/docs/usage.md +1231 -0
  21. terok-0.8.0/examples/hooks/task-notify.sh +14 -0
  22. terok-0.8.0/examples/projects/alpaka3/project.yml +46 -0
  23. terok-0.8.0/examples/projects/cp2k/project.yml +27 -0
  24. terok-0.8.0/examples/projects/uc/project.yml +32 -0
  25. terok-0.8.0/examples/projects/uc/user.dockerinclude +45 -0
  26. terok-0.8.0/examples/snippets/vibe-readable-colors.dockerinclude +6 -0
  27. terok-0.8.0/examples/terok-config.yml +118 -0
  28. terok-0.8.0/pyproject.toml +204 -0
  29. terok-0.8.0/src/terok/__init__.py +39 -0
  30. terok-0.8.0/src/terok/cli/__init__.py +8 -0
  31. terok-0.8.0/src/terok/cli/__main__.py +9 -0
  32. terok-0.8.0/src/terok/cli/commands/__init__.py +9 -0
  33. terok-0.8.0/src/terok/cli/commands/_completers.py +111 -0
  34. terok-0.8.0/src/terok/cli/commands/_desktop_entry.py +436 -0
  35. terok-0.8.0/src/terok/cli/commands/_storage_view.py +278 -0
  36. terok-0.8.0/src/terok/cli/commands/acp.py +381 -0
  37. terok-0.8.0/src/terok/cli/commands/agents.py +134 -0
  38. terok-0.8.0/src/terok/cli/commands/auth.py +159 -0
  39. terok-0.8.0/src/terok/cli/commands/clearance.py +32 -0
  40. terok-0.8.0/src/terok/cli/commands/completions.py +148 -0
  41. terok-0.8.0/src/terok/cli/commands/image.py +282 -0
  42. terok-0.8.0/src/terok/cli/commands/info.py +501 -0
  43. terok-0.8.0/src/terok/cli/commands/panic.py +110 -0
  44. terok-0.8.0/src/terok/cli/commands/project.py +405 -0
  45. terok-0.8.0/src/terok/cli/commands/setup.py +376 -0
  46. terok-0.8.0/src/terok/cli/commands/shield.py +226 -0
  47. terok-0.8.0/src/terok/cli/commands/sickbay.py +635 -0
  48. terok-0.8.0/src/terok/cli/commands/task.py +792 -0
  49. terok-0.8.0/src/terok/cli/commands/uninstall.py +166 -0
  50. terok-0.8.0/src/terok/cli/main.py +339 -0
  51. terok-0.8.0/src/terok/cli/tree.py +139 -0
  52. terok-0.8.0/src/terok/lib/__init__.py +9 -0
  53. terok-0.8.0/src/terok/lib/api/__init__.py +465 -0
  54. terok-0.8.0/src/terok/lib/api/agents.py +96 -0
  55. terok-0.8.0/src/terok/lib/api/clearance.py +42 -0
  56. terok-0.8.0/src/terok/lib/api/gate.py +27 -0
  57. terok-0.8.0/src/terok/lib/api/project.py +94 -0
  58. terok-0.8.0/src/terok/lib/api/setup.py +54 -0
  59. terok-0.8.0/src/terok/lib/api/shield.py +54 -0
  60. terok-0.8.0/src/terok/lib/api/task.py +113 -0
  61. terok-0.8.0/src/terok/lib/api/vault.py +170 -0
  62. terok-0.8.0/src/terok/lib/core/__init__.py +4 -0
  63. terok-0.8.0/src/terok/lib/core/config.py +820 -0
  64. terok-0.8.0/src/terok/lib/core/images.py +113 -0
  65. terok-0.8.0/src/terok/lib/core/paths.py +219 -0
  66. terok-0.8.0/src/terok/lib/core/project_model.py +206 -0
  67. terok-0.8.0/src/terok/lib/core/projects.py +596 -0
  68. terok-0.8.0/src/terok/lib/core/runtime.py +118 -0
  69. terok-0.8.0/src/terok/lib/core/task_display.py +89 -0
  70. terok-0.8.0/src/terok/lib/core/task_state.py +123 -0
  71. terok-0.8.0/src/terok/lib/core/version.py +238 -0
  72. terok-0.8.0/src/terok/lib/core/work_status.py +194 -0
  73. terok-0.8.0/src/terok/lib/core/yaml_schema.py +491 -0
  74. terok-0.8.0/src/terok/lib/domain/__init__.py +3 -0
  75. terok-0.8.0/src/terok/lib/domain/auth.py +235 -0
  76. terok-0.8.0/src/terok/lib/domain/image_cleanup.py +237 -0
  77. terok-0.8.0/src/terok/lib/domain/log_format.py +338 -0
  78. terok-0.8.0/src/terok/lib/domain/panic.py +390 -0
  79. terok-0.8.0/src/terok/lib/domain/project.py +889 -0
  80. terok-0.8.0/src/terok/lib/domain/project_state.py +239 -0
  81. terok-0.8.0/src/terok/lib/domain/ssh.py +37 -0
  82. terok-0.8.0/src/terok/lib/domain/storage.py +310 -0
  83. terok-0.8.0/src/terok/lib/domain/task.py +246 -0
  84. terok-0.8.0/src/terok/lib/domain/task_credentials.py +172 -0
  85. terok-0.8.0/src/terok/lib/domain/task_logs.py +243 -0
  86. terok-0.8.0/src/terok/lib/domain/vault.py +76 -0
  87. terok-0.8.0/src/terok/lib/domain/wizards/__init__.py +4 -0
  88. terok-0.8.0/src/terok/lib/domain/wizards/new_project.py +764 -0
  89. terok-0.8.0/src/terok/lib/integrations/__init__.py +21 -0
  90. terok-0.8.0/src/terok/lib/integrations/clearance.py +41 -0
  91. terok-0.8.0/src/terok/lib/integrations/executor.py +112 -0
  92. terok-0.8.0/src/terok/lib/integrations/sandbox.py +162 -0
  93. terok-0.8.0/src/terok/lib/integrations/shield.py +37 -0
  94. terok-0.8.0/src/terok/lib/orchestration/__init__.py +3 -0
  95. terok-0.8.0/src/terok/lib/orchestration/agent_config.py +106 -0
  96. terok-0.8.0/src/terok/lib/orchestration/container_doctor.py +772 -0
  97. terok-0.8.0/src/terok/lib/orchestration/container_exec.py +85 -0
  98. terok-0.8.0/src/terok/lib/orchestration/environment.py +607 -0
  99. terok-0.8.0/src/terok/lib/orchestration/hooks.py +184 -0
  100. terok-0.8.0/src/terok/lib/orchestration/image.py +475 -0
  101. terok-0.8.0/src/terok/lib/orchestration/ports.py +25 -0
  102. terok-0.8.0/src/terok/lib/orchestration/task_runners/__init__.py +49 -0
  103. terok-0.8.0/src/terok/lib/orchestration/task_runners/cli.py +184 -0
  104. terok-0.8.0/src/terok/lib/orchestration/task_runners/config.py +106 -0
  105. terok-0.8.0/src/terok/lib/orchestration/task_runners/container.py +341 -0
  106. terok-0.8.0/src/terok/lib/orchestration/task_runners/headless.py +471 -0
  107. terok-0.8.0/src/terok/lib/orchestration/task_runners/restart.py +150 -0
  108. terok-0.8.0/src/terok/lib/orchestration/task_runners/shield.py +283 -0
  109. terok-0.8.0/src/terok/lib/orchestration/task_runners/toad.py +344 -0
  110. terok-0.8.0/src/terok/lib/orchestration/tasks/__init__.py +135 -0
  111. terok-0.8.0/src/terok/lib/orchestration/tasks/archive.py +106 -0
  112. terok-0.8.0/src/terok/lib/orchestration/tasks/identity.py +149 -0
  113. terok-0.8.0/src/terok/lib/orchestration/tasks/lifecycle.py +669 -0
  114. terok-0.8.0/src/terok/lib/orchestration/tasks/meta.py +340 -0
  115. terok-0.8.0/src/terok/lib/orchestration/tasks/naming.py +100 -0
  116. terok-0.8.0/src/terok/lib/orchestration/tasks/query.py +364 -0
  117. terok-0.8.0/src/terok/lib/util/__init__.py +4 -0
  118. terok-0.8.0/src/terok/lib/util/ansi.py +93 -0
  119. terok-0.8.0/src/terok/lib/util/check_reporter.py +232 -0
  120. terok-0.8.0/src/terok/lib/util/emoji.py +132 -0
  121. terok-0.8.0/src/terok/lib/util/fs.py +79 -0
  122. terok-0.8.0/src/terok/lib/util/host_cmd.py +67 -0
  123. terok-0.8.0/src/terok/lib/util/logging_utils.py +67 -0
  124. terok-0.8.0/src/terok/lib/util/net.py +16 -0
  125. terok-0.8.0/src/terok/lib/util/subprocess_env.py +33 -0
  126. terok-0.8.0/src/terok/lib/util/yaml.py +57 -0
  127. terok-0.8.0/src/terok/resources/desktop/terok-symbolic.svg +75 -0
  128. terok-0.8.0/src/terok/resources/desktop/terok-xdg-terminal-exec.sh +38 -0
  129. terok-0.8.0/src/terok/resources/desktop/terok.desktop.template +13 -0
  130. terok-0.8.0/src/terok/resources/instructions/default.md +54 -0
  131. terok-0.8.0/src/terok/resources/presets/review.yml +23 -0
  132. terok-0.8.0/src/terok/resources/presets/solo.yml +16 -0
  133. terok-0.8.0/src/terok/resources/presets/team.yml +144 -0
  134. terok-0.8.0/src/terok/resources/templates/l2.project.Dockerfile.template +18 -0
  135. terok-0.8.0/src/terok/resources/templates/projects/project.yml.template +57 -0
  136. terok-0.8.0/src/terok/resources/tmux/host-tmux.conf +19 -0
  137. terok-0.8.0/src/terok/tui/__init__.py +8 -0
  138. terok-0.8.0/src/terok/tui/__main__.py +9 -0
  139. terok-0.8.0/src/terok/tui/_worker_entry.py +82 -0
  140. terok-0.8.0/src/terok/tui/agents_screen.py +234 -0
  141. terok-0.8.0/src/terok/tui/app.py +1856 -0
  142. terok-0.8.0/src/terok/tui/askpass.py +93 -0
  143. terok-0.8.0/src/terok/tui/askpass_protocol.py +114 -0
  144. terok-0.8.0/src/terok/tui/askpass_service.py +370 -0
  145. terok-0.8.0/src/terok/tui/clearance_screen.py +410 -0
  146. terok-0.8.0/src/terok/tui/clipboard.py +210 -0
  147. terok-0.8.0/src/terok/tui/console_log.py +369 -0
  148. terok-0.8.0/src/terok/tui/console_output_screen.py +132 -0
  149. terok-0.8.0/src/terok/tui/log_viewer.py +547 -0
  150. terok-0.8.0/src/terok/tui/polling.py +299 -0
  151. terok-0.8.0/src/terok/tui/project_actions.py +1058 -0
  152. terok-0.8.0/src/terok/tui/screens.py +2541 -0
  153. terok-0.8.0/src/terok/tui/selinux_fix_screen.py +147 -0
  154. terok-0.8.0/src/terok/tui/serve.py +413 -0
  155. terok-0.8.0/src/terok/tui/setup_screen.py +198 -0
  156. terok-0.8.0/src/terok/tui/shell_launch.py +215 -0
  157. terok-0.8.0/src/terok/tui/task_actions.py +973 -0
  158. terok-0.8.0/src/terok/tui/text_screens.py +152 -0
  159. terok-0.8.0/src/terok/tui/widgets/__init__.py +43 -0
  160. terok-0.8.0/src/terok/tui/widgets/panic_button.py +89 -0
  161. terok-0.8.0/src/terok/tui/widgets/project_list.py +127 -0
  162. terok-0.8.0/src/terok/tui/widgets/project_state.py +293 -0
  163. terok-0.8.0/src/terok/tui/widgets/status_bar.py +41 -0
  164. terok-0.8.0/src/terok/tui/widgets/task_detail.py +262 -0
  165. terok-0.8.0/src/terok/tui/widgets/task_list.py +183 -0
  166. terok-0.8.0/src/terok/tui/wizard_screens.py +1082 -0
  167. terok-0.8.0/src/terok/tui/worker_actions.py +262 -0
  168. terok-0.8.0/src/terok/tui/worker_log_screen.py +176 -0
  169. terok-0.8.0/src/terok/ui_utils/__init__.py +4 -0
  170. terok-0.8.0/src/terok/ui_utils/editor.py +56 -0
  171. terok-0.8.0/src/terok/ui_utils/terminal.py +77 -0
terok-0.8.0/LICENSE ADDED
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
terok-0.8.0/PKG-INFO ADDED
@@ -0,0 +1,265 @@
1
+ Metadata-Version: 2.4
2
+ Name: terok
3
+ Version: 0.8.0
4
+ Summary: Sandboxing for AI coding agents, built on Podman.
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ License-File: LICENSES/Apache-2.0.txt
8
+ Keywords: podman,containers,tasks,developer-tools,cli
9
+ Author: Jiri Vyskocil
10
+ Author-email: jiri@vyskocil.com
11
+ Maintainer: Jiri Vyskocil
12
+ Maintainer-email: jiri@vyskocil.com
13
+ Requires-Python: >=3.12,<3.15
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: System Administrators
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Security
25
+ Classifier: Topic :: System :: Systems Administration
26
+ Classifier: Typing :: Typed
27
+ Requires-Dist: argcomplete (>=3.1)
28
+ Requires-Dist: jinja2 (>=3.1)
29
+ Requires-Dist: platformdirs (>=4.5.1)
30
+ Requires-Dist: pydantic (>=2.6)
31
+ Requires-Dist: requests (>=2.31)
32
+ Requires-Dist: rich (>=13.0)
33
+ Requires-Dist: ruamel.yaml (>=0.18)
34
+ Requires-Dist: terok-clearance (>=0.7.0,<0.8.0)
35
+ Requires-Dist: terok-executor (>=0.1.0,<0.2.0)
36
+ Requires-Dist: terok-sandbox (>=0.1.0,<0.2.0)
37
+ Requires-Dist: terok-shield (>=0.7.0,<0.8.0)
38
+ Requires-Dist: terok-util (>=0.1.0,<0.2.0)
39
+ Requires-Dist: textual-serve (>=1.1.0)
40
+ Requires-Dist: textual[syntax] (==8.2.5)
41
+ Requires-Dist: unique-namer (>=1.3)
42
+ Project-URL: Changelog, https://github.com/terok-ai/terok/blob/master/CHANGELOG.md
43
+ Project-URL: Documentation, https://terok-ai.github.io/terok/
44
+ Project-URL: Homepage, https://terok.ai/
45
+ Project-URL: Issues, https://github.com/terok-ai/terok/issues
46
+ Project-URL: Repository, https://github.com/terok-ai/terok
47
+ Project-URL: Security, https://github.com/terok-ai/terok/security/policy
48
+ Description-Content-Type: text/markdown
49
+
50
+ <p align="center">
51
+ <picture>
52
+ <source media="(prefers-color-scheme: dark)" srcset="https://terok-ai.github.io/terok/terok-logo-w.svg">
53
+ <img src="https://terok-ai.github.io/terok/terok-logo-b.svg" alt="terok" width="120">
54
+ </picture>
55
+ </p>
56
+
57
+ # terok
58
+
59
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
60
+ [![REUSE status](https://api.reuse.software/badge/github.com/terok-ai/terok)](https://api.reuse.software/info/github.com/terok-ai/terok)
61
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=terok-ai_terok&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=terok-ai_terok)
62
+
63
+ > [!WARNING]
64
+ > Terok is in **alpha** development phase. It is under active development and until version
65
+ > 1.0.0 is released, APIs, internals, and security boundaries may change
66
+ > without deprecation notice. Not recommended for production deployment.
67
+
68
+ An open, Podman-native runtime for sandboxing AI coding agents in YOLO mode.
69
+
70
+ Terok runs each agent task inside a hardened, rootless container with
71
+ default-deny outbound networking, a credential vault that keeps real
72
+ keys on the host, a per-task git checkpoint, and a desktop
73
+ notification path for live allow/deny decisions. It ships a CLI
74
+ and a Textual TUI on top of a stack of independently-released
75
+ Python packages.
76
+
77
+ <p align="center">
78
+ <img src="docs/img/architecture.svg" alt="terok ecosystem at a glance">
79
+ </p>
80
+
81
+ ## What you get
82
+
83
+ ### Hardening
84
+
85
+ - **Rootless Podman** — no daemon, no privileged user namespace
86
+ - **Default-deny egress firewall** — via [terok-shield](https://github.com/terok-ai/terok-shield)
87
+ - **Credential vault** — secrets stay on the host
88
+ - **Per-task git gate** — a git mirror that the agent pushes through;
89
+ a human-review point before changes leave your machine
90
+ - **Live Allow / Deny prompts** — desktop notifications on blocked outbound traffic
91
+
92
+ ### Features
93
+
94
+ - **Projects ⊃ Tasks** — long-lived project config, ephemeral task
95
+ containers; many tasks per project.
96
+ - **Headless / interactive / web interface** — pick the launch mode
97
+ per task; same agents, same hardening.
98
+ - **Layered images** — base distro · agent CLIs · per-project
99
+ snippet, cached and reused across projects; Ubuntu / Debian /
100
+ Fedora / nvidia/cuda out of the box, GPU passthrough for projects
101
+ whose base image supports it.
102
+ - **Multi-vendor agents** — Claude Code, Codex, Copilot, Vibe, plus
103
+ custom LLM endpoints via OpenCode.
104
+
105
+ ## The five-package stack
106
+
107
+ | Package | Role |
108
+ |---------|------|
109
+ | **terok** (this repo) | Project orchestration, TUI, sickbay |
110
+ | [terok-executor](https://github.com/terok-ai/terok-executor) | Per-task agent runner, image factory, auth flows |
111
+ | [terok-sandbox](https://github.com/terok-ai/terok-sandbox) | Hardened Podman runtime, credential vault, git gate |
112
+ | [terok-shield](https://github.com/terok-ai/terok-shield) | nftables egress firewall + audit |
113
+ | [terok-clearance](https://github.com/terok-ai/terok-clearance) | Live allow/deny prompts via D-Bus + varlink |
114
+
115
+ ## Quick Start
116
+
117
+ ### Prerequisites
118
+
119
+ Hard dependencies:
120
+
121
+ - **Podman** (rootless)
122
+ - **`nft`** (nftables CLI)
123
+ - **Python 3.12+**
124
+ - **OpenSSH client** — for private git repos
125
+
126
+ Optional but recommended:
127
+
128
+ - **systemd** user session — runs the gate / vault / clearance daemons
129
+ - **`dnsmasq`** and **`dig`** — DNS plumbing the egress firewall uses
130
+ - A desktop **notification daemon** — for the Allow / Deny popups path
131
+
132
+ ### Installation
133
+
134
+ ```bash
135
+ pipx install terok
136
+ ```
137
+
138
+ ### One-time setup
139
+
140
+ ```bash
141
+ terok setup # idempotent; safe to re-run after upgrades
142
+ ```
143
+
144
+ `setup` installs the shield OCI hooks, the XDG desktop entry for the TUI, and shell
145
+ completions for your detected shell.
146
+
147
+ To remove everything later:
148
+
149
+ ```bash
150
+ terok uninstall # reverse of setup; preserves credential DB
151
+ ```
152
+
153
+ ### First project
154
+
155
+ Launch the TUI:
156
+
157
+ ```bash
158
+ terok # bare `terok` runs the TUI
159
+ ```
160
+
161
+ - Press **n** to run the project wizard (creates config, builds images, sets up SSH + gate)
162
+ - Select your new project, press **a** to authenticate your agent
163
+ - **Tab** to the task list, press **c** to start a CLI task
164
+
165
+ Or do the same from the command line:
166
+
167
+ ```bash
168
+ terok auth claude # authenticate host-wide
169
+ terok auth # interactive menu — pick multiple providers
170
+ terok project wizard # interactive project setup
171
+ terok task run myproj # create a CLI task and attach (default on TTY)
172
+ terok task run myproj --mode toad # web interface (browser access)
173
+ terok login myproj t3x # re-attach later by task ID prefix
174
+ ```
175
+
176
+ For manual project configuration or CI, see the [User Guide](docs/usage.md).
177
+
178
+ ### Headless agent runs (autopilot)
179
+
180
+ ```bash
181
+ # Run an agent headlessly with a prompt (uses default_agent config; falls back to claude)
182
+ terok task run myproj "Fix the authentication bug"
183
+
184
+ # With model override and timeout
185
+ terok task run myproj "Add tests" --model opus --timeout 3600
186
+
187
+ # Use a specific provider
188
+ terok task run myproj "Fix the bug" --provider codex
189
+ ```
190
+
191
+ ### Common Commands
192
+
193
+ ```bash
194
+ terok project list # List projects
195
+ terok config paths # Show resolved paths and config
196
+ terok task list <project> # List tasks
197
+ terok task delete <project> <task_id> # Delete a task
198
+ terok login <project> <id_prefix> # Attach to running task
199
+ terok project init <project> # Full setup: ssh + generate + build + gate
200
+ terok project wizard # Interactive project creation
201
+ terok image usage # Disk usage across projects and images
202
+ terok sickbay # In-container health checks
203
+ terok panic # Emergency kill-switch
204
+ terok image list [project] # List terok images
205
+ terok image cleanup [--dry-run] # Remove orphaned images
206
+ terok completions install # Re-install shell completions
207
+ ```
208
+
209
+ ## Notes
210
+
211
+ - **SELinux hosts**: install the policy module before `terok setup`,
212
+ otherwise the shield + clearance services bind sockets as
213
+ `unconfined_t` and podman will refuse to talk to them. The exact
214
+ install command (a `sudo bash` over the script terok-sandbox
215
+ ships) is printed by `terok setup` when the policy is missing —
216
+ run it once, then re-run `terok setup`.
217
+ - **AppArmor hosts**: install the policy otherwise the shield's dnsmasq won't
218
+ be able to read its confguration. The exact install command (a `sudo bash` over
219
+ the script terok-sandbox ships) is printed by `terok setup` when the policy is
220
+ missing — run it once, then re-run `terok setup`.
221
+ - **Clipboard**: If mouse selection doesn't copy to your clipboard,
222
+ hold **Shift** while selecting, then **Shift+Ctrl+C** to copy.
223
+ See [Tips](docs/usage.md#tips) for details.
224
+
225
+ ## Configuration
226
+
227
+ ### Global Config
228
+
229
+ Location: `~/.config/terok/config.yml`
230
+
231
+ ```yaml
232
+ git:
233
+ human_name: "Your Name"
234
+ human_email: "your@email.com"
235
+
236
+ image:
237
+ agents: "all" # default roster selection for every project
238
+ ```
239
+
240
+ If `git.human_name` and `git.human_email` are omitted, terok falls
241
+ through to your host `git config`. Setting them in `config.yml` is
242
+ the way to override the host-level identity for container commits.
243
+
244
+ To see what you can pick from for `image.agents`:
245
+
246
+ ```bash
247
+ terok agents # list available AI coding agents
248
+ ```
249
+
250
+ Officially-tested base images for `image.base_image`: `ubuntu:24.04`,
251
+ `fedora:44`, `quay.io/podman/stable`, `nvcr.io/nvidia/nvhpc`. Other
252
+ images in the same family (`ubuntu:*`, `debian:*`, `fedora:*`,
253
+ `nvcr.io/nvidia/*`, `quay.io/podman/*`) work via auto-detection;
254
+ anything else needs an explicit `image.family: deb|rpm` override.
255
+ See [docs/usage.md](docs/usage.md#choosing-which-agents-to-bake-in)
256
+ for the full mechanics.
257
+
258
+ ## Contributing
259
+
260
+ See the [Developer Guide](docs/developer.md).
261
+
262
+ ## License
263
+
264
+ See [LICENSE](LICENSE) file.
265
+