capos 0.1.4__tar.gz → 0.2.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 (128) hide show
  1. {capos-0.1.4 → capos-0.2.0}/Cargo.toml +1 -1
  2. capos-0.2.0/LICENSE-APACHE +201 -0
  3. capos-0.2.0/LICENSE-MIT +21 -0
  4. capos-0.2.0/PKG-INFO +200 -0
  5. capos-0.2.0/README.md +181 -0
  6. {capos-0.1.4 → capos-0.2.0}/capos-abi/Cargo.toml +1 -1
  7. {capos-0.1.4 → capos-0.2.0}/capos-abi/src/lib.rs +65 -0
  8. {capos-0.1.4 → capos-0.2.0}/capos-config/Cargo.toml +3 -0
  9. {capos-0.1.4 → capos-0.2.0}/capos-config/schema/capos.capnp +1172 -119
  10. {capos-0.1.4 → capos-0.2.0}/capos-config/src/account_store.rs +540 -38
  11. {capos-0.1.4 → capos-0.2.0}/capos-config/src/adventure_cloud_store.rs +155 -20
  12. {capos-0.1.4 → capos-0.2.0}/capos-config/src/adventure_expedition_service.rs +34 -0
  13. {capos-0.1.4 → capos-0.2.0}/capos-config/src/adventure_ledger.rs +34 -0
  14. {capos-0.1.4 → capos-0.2.0}/capos-config/src/adventure_profile_service.rs +204 -2
  15. {capos-0.1.4 → capos-0.2.0}/capos-config/src/adventure_save_store.rs +157 -1
  16. capos-0.2.0/capos-config/src/cap_table_lock_order.rs +155 -0
  17. capos-0.2.0/capos-config/src/credential_policy.rs +16 -0
  18. {capos-0.1.4 → capos-0.2.0}/capos-config/src/generated/capos_capnp.rs +90592 -59417
  19. capos-0.2.0/capos-config/src/generated/kernel_cap_requests.rs +655 -0
  20. capos-0.2.0/capos-config/src/launch_parameters.rs +364 -0
  21. {capos-0.1.4 → capos-0.2.0}/capos-config/src/lib.rs +39 -10
  22. {capos-0.1.4 → capos-0.2.0}/capos-config/src/manifest.rs +1176 -608
  23. {capos-0.1.4 → capos-0.2.0}/capos-config/src/process_layout.rs +5 -1
  24. {capos-0.1.4 → capos-0.2.0}/capos-config/src/ring.rs +1159 -47
  25. {capos-0.1.4 → capos-0.2.0}/capos-config/src/ssh_policy.rs +44 -0
  26. capos-0.2.0/capos-config/src/startup_failure.rs +121 -0
  27. {capos-0.1.4 → capos-0.2.0}/capos-config/src/validation.rs +579 -516
  28. {capos-0.1.4 → capos-0.2.0}/capos-python/Cargo.lock +57 -46
  29. {capos-0.1.4 → capos-0.2.0}/capos-python/Cargo.toml +5 -1
  30. capos-0.2.0/capos-python/LICENSE-APACHE +201 -0
  31. capos-0.2.0/capos-python/LICENSE-MIT +21 -0
  32. capos-0.2.0/capos-python/README.md +181 -0
  33. {capos-0.1.4 → capos-0.2.0}/capos-python/src/lib.rs +80 -12
  34. {capos-0.1.4 → capos-0.2.0}/pyproject.toml +17 -5
  35. capos-0.2.0/python/capos/__init__.py +9 -0
  36. capos-0.2.0/python/capos/hello.py +97 -0
  37. capos-0.2.0/tools/remote-session-client/Cargo.toml +19 -0
  38. {capos-0.1.4 → capos-0.2.0}/tools/remote-session-client/src/client.rs +318 -8
  39. {capos-0.1.4 → capos-0.2.0}/tools/remote-session-client/src/lib.rs +3 -3
  40. {capos-0.1.4 → capos-0.2.0}/tools/remote-session-client/src/protocol.rs +27 -0
  41. {capos-0.1.4 → capos-0.2.0}/tools/remote-session-client/src/transcript.rs +172 -4
  42. capos-0.1.4/PKG-INFO +0 -95
  43. capos-0.1.4/README.md +0 -78
  44. capos-0.1.4/capos-config/src/credential_policy.rs +0 -4
  45. capos-0.1.4/capos-python/.cargo/config.toml +0 -5
  46. capos-0.1.4/capos-python/README.md +0 -78
  47. capos-0.1.4/capos-python/examples/hello_live.py +0 -55
  48. capos-0.1.4/capos-python/examples/remote_session.py +0 -43
  49. capos-0.1.4/capos-python/tests/test_capos.py +0 -36
  50. capos-0.1.4/tools/remote-session-client/Cargo.toml +0 -19
  51. capos-0.1.4/tools/remote-session-client/src/bin/remote_session_ui.rs +0 -11427
  52. capos-0.1.4/tools/remote-session-client/src/main.rs +0 -310
  53. capos-0.1.4/tools/remote-session-client/ui/app.js +0 -3818
  54. capos-0.1.4/tools/remote-session-client/ui/assets/apple-touch-icon.png +0 -0
  55. capos-0.1.4/tools/remote-session-client/ui/assets/bg-mountain.2k.webp +0 -0
  56. capos-0.1.4/tools/remote-session-client/ui/assets/bg-space.2k.webp +0 -0
  57. capos-0.1.4/tools/remote-session-client/ui/assets/design-mockup-light-login.webp +0 -0
  58. capos-0.1.4/tools/remote-session-client/ui/assets/design-mockup-mountain-login.webp +0 -0
  59. capos-0.1.4/tools/remote-session-client/ui/assets/design-mockup-operator-console.webp +0 -0
  60. capos-0.1.4/tools/remote-session-client/ui/assets/design-mockup-space-login.webp +0 -0
  61. capos-0.1.4/tools/remote-session-client/ui/assets/favicon-192.png +0 -0
  62. capos-0.1.4/tools/remote-session-client/ui/assets/favicon-32.png +0 -0
  63. capos-0.1.4/tools/remote-session-client/ui/assets/logo-dark.webp +0 -0
  64. capos-0.1.4/tools/remote-session-client/ui/assets/logo-light.webp +0 -0
  65. capos-0.1.4/tools/remote-session-client/ui/assets/mark-dark.webp +0 -0
  66. capos-0.1.4/tools/remote-session-client/ui/assets/mark-light.webp +0 -0
  67. capos-0.1.4/tools/remote-session-client/ui/design-bundle/CAPOS-INTEGRATION.md +0 -122
  68. capos-0.1.4/tools/remote-session-client/ui/design-bundle/README.md +0 -25
  69. capos-0.1.4/tools/remote-session-client/ui/design-bundle/capOS-remote-client-retro-handoff.tar.gz +0 -3
  70. capos-0.1.4/tools/remote-session-client/ui/design-bundle/chats/chat1.md +0 -578
  71. capos-0.1.4/tools/remote-session-client/ui/design-bundle/chats/chat2.md +0 -135
  72. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/apple-touch-icon.png +0 -0
  73. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/bg-mountain.webp +0 -0
  74. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/bg-space.webp +0 -0
  75. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/favicon-192.png +0 -0
  76. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/favicon-32.png +0 -0
  77. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/glyph.png +0 -0
  78. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/logo-dark.webp +0 -0
  79. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/logo-light.webp +0 -0
  80. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/logo-on-dark.png +0 -0
  81. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/logo-on-light.png +0 -0
  82. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/mark-dark.webp +0 -0
  83. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/assets/mark-light.webp +0 -0
  84. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/capOS Login.html +0 -57
  85. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/capOS Workspace.html +0 -60
  86. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/app.jsx +0 -380
  87. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/atoms.jsx +0 -222
  88. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/chrome.jsx +0 -321
  89. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/icons.jsx +0 -212
  90. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/login-form.jsx +0 -264
  91. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/mfa-step.jsx +0 -170
  92. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/success-step.jsx +0 -75
  93. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/themes.jsx +0 -136
  94. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/ws-app.jsx +0 -234
  95. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/ws-atoms.jsx +0 -127
  96. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/ws-chat-group.jsx +0 -390
  97. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/ws-chatlist.jsx +0 -113
  98. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/ws-data.jsx +0 -224
  99. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/ws-icons.jsx +0 -68
  100. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/ws-services.jsx +0 -211
  101. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/ws-shell.jsx +0 -317
  102. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/src/ws-views.jsx +0 -509
  103. capos-0.1.4/tools/remote-session-client/ui/design-bundle/project/tweaks-panel.jsx +0 -425
  104. capos-0.1.4/tools/remote-session-client/ui/feature-flags.js +0 -27
  105. capos-0.1.4/tools/remote-session-client/ui/index.html +0 -546
  106. capos-0.1.4/tools/remote-session-client/ui/styles.css +0 -3631
  107. capos-0.1.4/tools/remote-session-client/ui/themes/retro.css +0 -443
  108. {capos-0.1.4 → capos-0.2.0}/capos-abi/README.md +0 -0
  109. {capos-0.1.4 → capos-0.2.0}/capos-abi/src/scheduler.rs +0 -0
  110. {capos-0.1.4 → capos-0.2.0}/capos-config/README.md +0 -0
  111. {capos-0.1.4 → capos-0.2.0}/capos-config/build.rs +0 -0
  112. {capos-0.1.4 → capos-0.2.0}/capos-config/src/adventure_save.rs +0 -0
  113. {capos-0.1.4 → capos-0.2.0}/capos-config/src/adventure_save_vault.rs +0 -0
  114. {capos-0.1.4 → capos-0.2.0}/capos-config/src/capset.rs +0 -0
  115. {capos-0.1.4 → capos-0.2.0}/capos-config/src/cue.rs +0 -0
  116. {capos-0.1.4 → capos-0.2.0}/capos-config/src/error.rs +0 -0
  117. {capos-0.1.4 → capos-0.2.0}/capos-config/src/resource_profile.rs +0 -0
  118. {capos-0.1.4 → capos-0.2.0}/capos-config/src/service_object.rs +0 -0
  119. {capos-0.1.4 → capos-0.2.0}/tools/capnp-build/Cargo.toml +0 -0
  120. {capos-0.1.4 → capos-0.2.0}/tools/capnp-build/README.md +0 -0
  121. {capos-0.1.4 → capos-0.2.0}/tools/capnp-build/src/doc_comments/decode.rs +0 -0
  122. {capos-0.1.4 → capos-0.2.0}/tools/capnp-build/src/doc_comments.rs +0 -0
  123. {capos-0.1.4 → capos-0.2.0}/tools/capnp-build/src/lib.rs +0 -0
  124. {capos-0.1.4 → capos-0.2.0}/tools/remote-session-client/Cargo.lock +0 -0
  125. {capos-0.1.4 → capos-0.2.0}/tools/remote-session-client/src/frame.rs +0 -0
  126. {capos-0.1.4 → capos-0.2.0}/tools/remote-session-client/src/rpc_facade.rs +0 -0
  127. {capos-0.1.4 → capos-0.2.0}/tools/remote-session-client/src/session_diff.rs +0 -0
  128. {capos-0.1.4 → capos-0.2.0}/tools/remote-session-client/src/web_security.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  [workspace]
2
2
  resolver = "2"
3
- members = ["capos-abi", "capos-config", "capos-lib", "capos-tls", "kernel", "tools/capnp-build"]
3
+ members = ["capos-abi", "capos-config", "capos-lib", "capos-tls", "kernel", "tools/capability-expectations", "tools/capnp-build"]
4
4
  default-members = ["capos-config", "capos-lib", "capos-tls", "kernel"]
5
5
  # The vendored fatfs / rustls-webpki / webpki-roots crates (path dependencies)
6
6
  # each declare their own `[workspace]` so `cargo fmt` leaves the snapshots
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright (c) 2018-2024 Robin Freyler
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andrew Grigorev and the capOS contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
capos-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,200 @@
1
+ Metadata-Version: 2.4
2
+ Name: capos
3
+ Version: 0.2.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: 3
6
+ Classifier: Operating System :: POSIX :: Linux
7
+ Classifier: Development Status :: 2 - Pre-Alpha
8
+ License-File: LICENSE-MIT
9
+ License-File: LICENSE-APACHE
10
+ Summary: Host-side Python bindings for capOS, the capability operating system: a remote-session client over the CapSet forwarding protocol (https://cap-os.dev).
11
+ Keywords: capos,capability,operating-system,sdk
12
+ Author: Andrew Grigorev
13
+ License-Expression: MIT OR Apache-2.0
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
16
+ Project-URL: Documentation, https://cap-os.dev/sdks
17
+ Project-URL: Homepage, https://cap-os.dev
18
+
19
+ # capos (Python)
20
+
21
+ Host-side Python bindings for [capOS](https://cap-os.dev), a research capability
22
+ operating system where every resource is a typed Cap'n Proto capability.
23
+
24
+ This package is the working base for the host-side capOS SDK: it binds capOS's
25
+ in-repo host remote-session client, which speaks the CapSet forwarding protocol
26
+ that a running capOS exposes over its userspace network stack. That protocol is
27
+ the concrete shape of the `capos` Rust crate's reserved `remote` transport,
28
+ surfaced here in Python. Today it covers connecting, authenticating, listing the
29
+ forwarded CapSet, and reading session metadata, the system MOTD, and the running
30
+ kernel's build identity; more of the typed capability surface follows.
31
+
32
+ ## Install
33
+
34
+ This README describes release `0.2.0` of the `capos` package on PyPI; the
35
+ release before it is `0.1.4`.
36
+
37
+ ```bash
38
+ pip install capos==0.2.0
39
+ ```
40
+
41
+ Prebuilt wheels target Linux x86_64, CPython 3.9+ (abi3). On other platforms pip
42
+ builds the source distribution, which compiles the Rust extension and generates
43
+ its Cap'n Proto bindings. That build needs Rust 1.88 or newer and the Cap'n
44
+ Proto 1.2.0 compiler installed at
45
+ `${CAPOS_TOOLS_ROOT:-$HOME/.capos-tools}/capnp/1.2.0/bin/capnp`: the build
46
+ refuses a `capnp` anywhere else, and `CAPOS_CAPNP`, if set, must name that same
47
+ file. Building the [Cap'n Proto 1.2.0 release](https://capnproto.org/install.html)
48
+ with `./configure --prefix="$HOME/.capos-tools/capnp/1.2.0"` installs it there.
49
+
50
+ Release `0.2.0` supports login, session metadata, MOTD reads, CapSet listing,
51
+ and the kernel build identity (`Client.system_info()`), and installs the
52
+ `capos-hello` command. It changes two behaviors that code written against
53
+ `0.1.x` can observe; read the [changelog](#changelog) before upgrading.
54
+
55
+ ## Live hello: talk to a running capOS
56
+
57
+ The hello-world is a real conversation with a running kernel, not a canned
58
+ string. Bring up a capOS instance that serves the remote-session gateway on
59
+ guest port 2327 over its userspace network stack. From the capOS repository,
60
+ the focused proof boots that system, drives its clients, and tears the VM down
61
+ when the proof finishes:
62
+
63
+ ```bash
64
+ make run-remote-session-capset-interop
65
+ ```
66
+
67
+ For a manual run, keep the VM target running in one terminal with an explicit
68
+ host forward:
69
+
70
+ ```bash
71
+ CAPOS_REMOTE_SESSION_CAPSET_INTEROP_QEMU_TIMEOUT=600s \
72
+ make QEMU_NET='-netdev user,id=n0,hostfwd=tcp:127.0.0.1:2327-:2327 -device virtio-net-pci,netdev=n0' \
73
+ test-remote-session-capset-interop-vm
74
+ ```
75
+
76
+ The package installs the hello as the `capos-hello` command; `python -m
77
+ capos.hello` runs the same code. From a second terminal:
78
+
79
+ ```bash
80
+ capos-hello --host 127.0.0.1 --port 2327
81
+ ```
82
+
83
+ It logs in with the account that focused manifest provisions (`--user operator
84
+ --password capos --profile operator` are the defaults), then prints the kernel
85
+ build identity, the MOTD, and the forwarded CapSet. `--identity-only` stops
86
+ after the identity line. While the guest network stack starts, the hello retries
87
+ a failed connection until `--connect-timeout-ms` (default `60000`) has passed.
88
+ That deadline is checked only after a failed attempt, so it is not a hard
89
+ limit: an attempt that starts before it can run past it (name resolution plus up
90
+ to the 60-second connect timeout per resolved address) and can still succeed,
91
+ and a retry sleep can be added before the check.
92
+
93
+ Example output (identity values are illustrative):
94
+
95
+ ```text
96
+ capos python client 0.2.0
97
+ connecting to capOS at 127.0.0.1:2327 ...
98
+ logged in as operator (profile operator)
99
+ capOS capos 0.1.0 (0123456789ab, 2026-07-18T09:00:00+00:00) — client 0.2.0
100
+ capOS says: _ __ __ __
101
+ | | / /__ / /________ ____ ___ ___ / /_____
102
+ | | /| / / _ \/ / ___/ __ \/ __ `__ \/ _ \ / __/ __ \
103
+ | |/ |/ / __/ / /__/ /_/ / / / / / / __/ / /_/ /_/ /
104
+ |__/|__/\___/_/\___/\____/_/ /_/ /_/\___/ \__/\____/
105
+ ... (live welcome banner) ...
106
+ forwarded capabilities:
107
+ - session (interface 0x80b87169c39aaf1c)
108
+ - system_info (interface 0xfbbdc602980cb986)
109
+ - adventure (interface 0xd5dc40d973e75b84)
110
+ - chat (interface 0xd5dc40d973e75b84)
111
+ ```
112
+
113
+ `make run-remote-session-capset-interop` is the combined gateway proof. It
114
+ builds this binding from source, logs in with the Python hello, and checks its
115
+ exact build-identity line; the Rust client separately proves the MOTD and
116
+ CapSet reads over the same live gateway.
117
+
118
+ The recording below was made with release `0.1.4`, before `system_info()`
119
+ existed, so it shows the login, MOTD, and CapSet reads but not the
120
+ build-identity line:
121
+
122
+ ![capos live hello-world](https://cap-os.dev/assets/casts/hello-python.svg)
123
+
124
+ ## Using the client
125
+
126
+ ```python
127
+ import capos
128
+
129
+ with capos.Client(host="127.0.0.1", port=2327) as client:
130
+ client.login_password("operator", "capos", profile="operator")
131
+ info = client.system_info()
132
+ print(info.hostname, info.version, info.commit, info.built_at)
133
+ print(client.system_motd())
134
+ for cap in client.list_capset():
135
+ print(cap)
136
+ ```
137
+
138
+ `login_anonymous()` and `login_guest()` default to the `anonymous` and `guest`
139
+ profiles, the only ones the gateway accepts for those methods; the operator
140
+ console needs `login_password`.
141
+
142
+ Errors come in two kinds. `ConnectionError` means the transport is gone: the
143
+ constructor raises it when the last attempt has failed after
144
+ `connect_deadline_ms` has passed (the same check-after-failure rule as the
145
+ hello's deadline above), and a
146
+ call that talks to the gateway raises it after a timeout, an I/O error, or a
147
+ partial or out-of-sequence response frame. The client then shuts its stream
148
+ down, and every later call that would talk to the gateway raises
149
+ `ConnectionError` without sending anything; create a new `Client` to reconnect.
150
+ The local accessors `transcript_dropped()` and `is_logged_out()` keep
151
+ answering, and leaving a `with` block still attempts a logout and ignores its
152
+ failure. `RuntimeError` means the gateway answered but refused or returned
153
+ something unexpected (denied login, missing capability, wrong interface, or a
154
+ complete frame the client cannot decode); the client stays usable.
155
+
156
+ The client keeps a small internal transcript for diagnostics. It holds at most
157
+ `transcript_max_events` rows (default 256) and about `transcript_max_bytes` of
158
+ row data (default 256 KiB), dropping the oldest rows first and counting them in
159
+ `client.transcript_dropped()`. The newest row is always kept, so one row larger
160
+ than the byte bound stays in memory until the next row replaces it.
161
+
162
+ ## Changelog
163
+
164
+ - **0.2.0** — two incompatible changes, then additions.
165
+ - **Changed:** `login_anonymous()` and `login_guest()` default to the
166
+ `anonymous` and `guest` profiles. Releases 0.1.2 to 0.1.4, the ones with a
167
+ `Client`, defaulted to `operator`, which the gateway always denies for those
168
+ methods. To keep sending the old request, pass the profile explicitly:
169
+ `login_anonymous("operator")`.
170
+ - **Changed:** a transport failure on a connected client (timeout, I/O error,
171
+ partial or out-of-sequence frame) raises `ConnectionError` instead of
172
+ `RuntimeError`, and the client fails closed afterwards: every later call
173
+ that talks to the gateway raises `ConnectionError` until you create a new
174
+ `Client`. To migrate, catch `ConnectionError` where you caught
175
+ `RuntimeError` for these failures, and reconnect instead of retrying on the
176
+ same client.
177
+ - **Added:** `Client.system_info()` returns a `SystemInfo` with the running
178
+ kernel's `hostname`, `version`, `commit`, and `built_at`.
179
+ - **Added:** the `capos-hello` command (`python -m capos.hello`), the live
180
+ hello that 0.1.4 carried only as a repository example.
181
+ - **Added:** the internal transcript is bounded, with the
182
+ `transcript_max_events` and `transcript_max_bytes` constructor arguments
183
+ and `Client.transcript_dropped()`. Releases 0.1.2 to 0.1.4 grew it without
184
+ limit.
185
+ - **Packaging:** the package now ships Python source next to the compiled
186
+ extension: `capos/__init__.py` is maintained in the source tree instead of
187
+ generated by the build, and the new `capos.hello` module sits beside it.
188
+ The extension stays at `capos.capos`, and the top-level `capos` module
189
+ re-exports its public names and `__version__` as in 0.1.4. The wheel and
190
+ the source distribution now carry the MIT and Apache-2.0 license texts.
191
+ - **0.1.4** — the hello-world is now a real live run against a capOS kernel
192
+ (`examples/hello_live.py`); the static `hello()` placeholder was removed.
193
+
194
+ ## Links
195
+
196
+ - Project: <https://cap-os.dev>
197
+ - SDK documentation: <https://cap-os.dev/sdks>
198
+
199
+ Licensed under either of MIT or Apache-2.0 at your option.
200
+
capos-0.2.0/README.md ADDED
@@ -0,0 +1,181 @@
1
+ # capos (Python)
2
+
3
+ Host-side Python bindings for [capOS](https://cap-os.dev), a research capability
4
+ operating system where every resource is a typed Cap'n Proto capability.
5
+
6
+ This package is the working base for the host-side capOS SDK: it binds capOS's
7
+ in-repo host remote-session client, which speaks the CapSet forwarding protocol
8
+ that a running capOS exposes over its userspace network stack. That protocol is
9
+ the concrete shape of the `capos` Rust crate's reserved `remote` transport,
10
+ surfaced here in Python. Today it covers connecting, authenticating, listing the
11
+ forwarded CapSet, and reading session metadata, the system MOTD, and the running
12
+ kernel's build identity; more of the typed capability surface follows.
13
+
14
+ ## Install
15
+
16
+ This README describes release `0.2.0` of the `capos` package on PyPI; the
17
+ release before it is `0.1.4`.
18
+
19
+ ```bash
20
+ pip install capos==0.2.0
21
+ ```
22
+
23
+ Prebuilt wheels target Linux x86_64, CPython 3.9+ (abi3). On other platforms pip
24
+ builds the source distribution, which compiles the Rust extension and generates
25
+ its Cap'n Proto bindings. That build needs Rust 1.88 or newer and the Cap'n
26
+ Proto 1.2.0 compiler installed at
27
+ `${CAPOS_TOOLS_ROOT:-$HOME/.capos-tools}/capnp/1.2.0/bin/capnp`: the build
28
+ refuses a `capnp` anywhere else, and `CAPOS_CAPNP`, if set, must name that same
29
+ file. Building the [Cap'n Proto 1.2.0 release](https://capnproto.org/install.html)
30
+ with `./configure --prefix="$HOME/.capos-tools/capnp/1.2.0"` installs it there.
31
+
32
+ Release `0.2.0` supports login, session metadata, MOTD reads, CapSet listing,
33
+ and the kernel build identity (`Client.system_info()`), and installs the
34
+ `capos-hello` command. It changes two behaviors that code written against
35
+ `0.1.x` can observe; read the [changelog](#changelog) before upgrading.
36
+
37
+ ## Live hello: talk to a running capOS
38
+
39
+ The hello-world is a real conversation with a running kernel, not a canned
40
+ string. Bring up a capOS instance that serves the remote-session gateway on
41
+ guest port 2327 over its userspace network stack. From the capOS repository,
42
+ the focused proof boots that system, drives its clients, and tears the VM down
43
+ when the proof finishes:
44
+
45
+ ```bash
46
+ make run-remote-session-capset-interop
47
+ ```
48
+
49
+ For a manual run, keep the VM target running in one terminal with an explicit
50
+ host forward:
51
+
52
+ ```bash
53
+ CAPOS_REMOTE_SESSION_CAPSET_INTEROP_QEMU_TIMEOUT=600s \
54
+ make QEMU_NET='-netdev user,id=n0,hostfwd=tcp:127.0.0.1:2327-:2327 -device virtio-net-pci,netdev=n0' \
55
+ test-remote-session-capset-interop-vm
56
+ ```
57
+
58
+ The package installs the hello as the `capos-hello` command; `python -m
59
+ capos.hello` runs the same code. From a second terminal:
60
+
61
+ ```bash
62
+ capos-hello --host 127.0.0.1 --port 2327
63
+ ```
64
+
65
+ It logs in with the account that focused manifest provisions (`--user operator
66
+ --password capos --profile operator` are the defaults), then prints the kernel
67
+ build identity, the MOTD, and the forwarded CapSet. `--identity-only` stops
68
+ after the identity line. While the guest network stack starts, the hello retries
69
+ a failed connection until `--connect-timeout-ms` (default `60000`) has passed.
70
+ That deadline is checked only after a failed attempt, so it is not a hard
71
+ limit: an attempt that starts before it can run past it (name resolution plus up
72
+ to the 60-second connect timeout per resolved address) and can still succeed,
73
+ and a retry sleep can be added before the check.
74
+
75
+ Example output (identity values are illustrative):
76
+
77
+ ```text
78
+ capos python client 0.2.0
79
+ connecting to capOS at 127.0.0.1:2327 ...
80
+ logged in as operator (profile operator)
81
+ capOS capos 0.1.0 (0123456789ab, 2026-07-18T09:00:00+00:00) — client 0.2.0
82
+ capOS says: _ __ __ __
83
+ | | / /__ / /________ ____ ___ ___ / /_____
84
+ | | /| / / _ \/ / ___/ __ \/ __ `__ \/ _ \ / __/ __ \
85
+ | |/ |/ / __/ / /__/ /_/ / / / / / / __/ / /_/ /_/ /
86
+ |__/|__/\___/_/\___/\____/_/ /_/ /_/\___/ \__/\____/
87
+ ... (live welcome banner) ...
88
+ forwarded capabilities:
89
+ - session (interface 0x80b87169c39aaf1c)
90
+ - system_info (interface 0xfbbdc602980cb986)
91
+ - adventure (interface 0xd5dc40d973e75b84)
92
+ - chat (interface 0xd5dc40d973e75b84)
93
+ ```
94
+
95
+ `make run-remote-session-capset-interop` is the combined gateway proof. It
96
+ builds this binding from source, logs in with the Python hello, and checks its
97
+ exact build-identity line; the Rust client separately proves the MOTD and
98
+ CapSet reads over the same live gateway.
99
+
100
+ The recording below was made with release `0.1.4`, before `system_info()`
101
+ existed, so it shows the login, MOTD, and CapSet reads but not the
102
+ build-identity line:
103
+
104
+ ![capos live hello-world](https://cap-os.dev/assets/casts/hello-python.svg)
105
+
106
+ ## Using the client
107
+
108
+ ```python
109
+ import capos
110
+
111
+ with capos.Client(host="127.0.0.1", port=2327) as client:
112
+ client.login_password("operator", "capos", profile="operator")
113
+ info = client.system_info()
114
+ print(info.hostname, info.version, info.commit, info.built_at)
115
+ print(client.system_motd())
116
+ for cap in client.list_capset():
117
+ print(cap)
118
+ ```
119
+
120
+ `login_anonymous()` and `login_guest()` default to the `anonymous` and `guest`
121
+ profiles, the only ones the gateway accepts for those methods; the operator
122
+ console needs `login_password`.
123
+
124
+ Errors come in two kinds. `ConnectionError` means the transport is gone: the
125
+ constructor raises it when the last attempt has failed after
126
+ `connect_deadline_ms` has passed (the same check-after-failure rule as the
127
+ hello's deadline above), and a
128
+ call that talks to the gateway raises it after a timeout, an I/O error, or a
129
+ partial or out-of-sequence response frame. The client then shuts its stream
130
+ down, and every later call that would talk to the gateway raises
131
+ `ConnectionError` without sending anything; create a new `Client` to reconnect.
132
+ The local accessors `transcript_dropped()` and `is_logged_out()` keep
133
+ answering, and leaving a `with` block still attempts a logout and ignores its
134
+ failure. `RuntimeError` means the gateway answered but refused or returned
135
+ something unexpected (denied login, missing capability, wrong interface, or a
136
+ complete frame the client cannot decode); the client stays usable.
137
+
138
+ The client keeps a small internal transcript for diagnostics. It holds at most
139
+ `transcript_max_events` rows (default 256) and about `transcript_max_bytes` of
140
+ row data (default 256 KiB), dropping the oldest rows first and counting them in
141
+ `client.transcript_dropped()`. The newest row is always kept, so one row larger
142
+ than the byte bound stays in memory until the next row replaces it.
143
+
144
+ ## Changelog
145
+
146
+ - **0.2.0** — two incompatible changes, then additions.
147
+ - **Changed:** `login_anonymous()` and `login_guest()` default to the
148
+ `anonymous` and `guest` profiles. Releases 0.1.2 to 0.1.4, the ones with a
149
+ `Client`, defaulted to `operator`, which the gateway always denies for those
150
+ methods. To keep sending the old request, pass the profile explicitly:
151
+ `login_anonymous("operator")`.
152
+ - **Changed:** a transport failure on a connected client (timeout, I/O error,
153
+ partial or out-of-sequence frame) raises `ConnectionError` instead of
154
+ `RuntimeError`, and the client fails closed afterwards: every later call
155
+ that talks to the gateway raises `ConnectionError` until you create a new
156
+ `Client`. To migrate, catch `ConnectionError` where you caught
157
+ `RuntimeError` for these failures, and reconnect instead of retrying on the
158
+ same client.
159
+ - **Added:** `Client.system_info()` returns a `SystemInfo` with the running
160
+ kernel's `hostname`, `version`, `commit`, and `built_at`.
161
+ - **Added:** the `capos-hello` command (`python -m capos.hello`), the live
162
+ hello that 0.1.4 carried only as a repository example.
163
+ - **Added:** the internal transcript is bounded, with the
164
+ `transcript_max_events` and `transcript_max_bytes` constructor arguments
165
+ and `Client.transcript_dropped()`. Releases 0.1.2 to 0.1.4 grew it without
166
+ limit.
167
+ - **Packaging:** the package now ships Python source next to the compiled
168
+ extension: `capos/__init__.py` is maintained in the source tree instead of
169
+ generated by the build, and the new `capos.hello` module sits beside it.
170
+ The extension stays at `capos.capos`, and the top-level `capos` module
171
+ re-exports its public names and `__version__` as in 0.1.4. The wheel and
172
+ the source distribution now carry the MIT and Apache-2.0 license texts.
173
+ - **0.1.4** — the hello-world is now a real live run against a capOS kernel
174
+ (`examples/hello_live.py`); the static `hello()` placeholder was removed.
175
+
176
+ ## Links
177
+
178
+ - Project: <https://cap-os.dev>
179
+ - SDK documentation: <https://cap-os.dev/sdks>
180
+
181
+ Licensed under either of MIT or Apache-2.0 at your option.
@@ -3,7 +3,7 @@ name = "capos-abi"
3
3
  version = "0.1.0"
4
4
  edition = "2024"
5
5
  rust-version = "1.88.0"
6
- description = "Shared no_std ABI and policy constants (process/thread quotas, credential and endpoint policy limits) for the capOS capability operating system."
6
+ description = "Shared no_std ABI and policy constants (process/thread quotas, credential and endpoint policy limits, audit-record text/id bounds) for the capOS capability operating system."
7
7
  license = "MIT OR Apache-2.0"
8
8
  repository = "https://github.com/ei-grad/capos"
9
9
  readme = "README.md"