cedric-agent 1.0.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.
- cedric_agent-1.0.0/.gitignore +19 -0
- cedric_agent-1.0.0/LICENSE +201 -0
- cedric_agent-1.0.0/NOTICE +7 -0
- cedric_agent-1.0.0/PKG-INFO +364 -0
- cedric_agent-1.0.0/README.md +316 -0
- cedric_agent-1.0.0/THIRD_PARTY_NOTICES.md +146 -0
- cedric_agent-1.0.0/pyproject.toml +91 -0
- cedric_agent-1.0.0/src/cedric/__init__.py +3 -0
- cedric_agent-1.0.0/src/cedric/__main__.py +4 -0
- cedric_agent-1.0.0/src/cedric/agents/__init__.py +5 -0
- cedric_agent-1.0.0/src/cedric/agents/scheduler.py +370 -0
- cedric_agent-1.0.0/src/cedric/cli.py +657 -0
- cedric_agent-1.0.0/src/cedric/config.py +100 -0
- cedric_agent-1.0.0/src/cedric/core.py +47 -0
- cedric_agent-1.0.0/src/cedric/goals/__init__.py +1 -0
- cedric_agent-1.0.0/src/cedric/identity/__init__.py +1 -0
- cedric_agent-1.0.0/src/cedric/memory/__init__.py +12 -0
- cedric_agent-1.0.0/src/cedric/memory/models.py +55 -0
- cedric_agent-1.0.0/src/cedric/memory/system.py +518 -0
- cedric_agent-1.0.0/src/cedric/models/__init__.py +6 -0
- cedric_agent-1.0.0/src/cedric/models/base.py +28 -0
- cedric_agent-1.0.0/src/cedric/models/deepseek.py +196 -0
- cedric_agent-1.0.0/src/cedric/protocol/__init__.py +18 -0
- cedric_agent-1.0.0/src/cedric/protocol/events.py +40 -0
- cedric_agent-1.0.0/src/cedric/protocol/messages.py +150 -0
- cedric_agent-1.0.0/src/cedric/protocol/models.py +58 -0
- cedric_agent-1.0.0/src/cedric/protocol/tasks.py +96 -0
- cedric_agent-1.0.0/src/cedric/py.typed +1 -0
- cedric_agent-1.0.0/src/cedric/resources/__init__.py +1 -0
- cedric_agent-1.0.0/src/cedric/resources/bootstrap/__init__.py +1 -0
- cedric_agent-1.0.0/src/cedric/resources/bootstrap/core.md +8 -0
- cedric_agent-1.0.0/src/cedric/resources/bootstrap/principles.md +9 -0
- cedric_agent-1.0.0/src/cedric/runtime/__init__.py +12 -0
- cedric_agent-1.0.0/src/cedric/runtime/agent.py +494 -0
- cedric_agent-1.0.0/src/cedric/runtime/application.py +221 -0
- cedric_agent-1.0.0/src/cedric/selfmod/__init__.py +15 -0
- cedric_agent-1.0.0/src/cedric/selfmod/candidates.py +238 -0
- cedric_agent-1.0.0/src/cedric/selfmod/client.py +241 -0
- cedric_agent-1.0.0/src/cedric/selfmod/models.py +62 -0
- cedric_agent-1.0.0/src/cedric/selfmod/store.py +312 -0
- cedric_agent-1.0.0/src/cedric/storage/__init__.py +15 -0
- cedric_agent-1.0.0/src/cedric/storage/agent_store.py +731 -0
- cedric_agent-1.0.0/src/cedric/storage/database.py +121 -0
- cedric_agent-1.0.0/src/cedric/storage/migrations/0001_initial.sql +95 -0
- cedric_agent-1.0.0/src/cedric/storage/migrations/0002_agent_loop.sql +59 -0
- cedric_agent-1.0.0/src/cedric/storage/migrations/0003_memory_index.sql +30 -0
- cedric_agent-1.0.0/src/cedric/storage/migrations/0004_scheduler.sql +48 -0
- cedric_agent-1.0.0/src/cedric/storage/migrations/0005_self_modification.sql +36 -0
- cedric_agent-1.0.0/src/cedric/storage/migrations/0006_supervisor_cursors.sql +6 -0
- cedric_agent-1.0.0/src/cedric/storage/migrations/0007_trust_resources.sql +163 -0
- cedric_agent-1.0.0/src/cedric/storage/migrations/0008_stability.sql +4 -0
- cedric_agent-1.0.0/src/cedric/storage/migrations/__init__.py +1 -0
- cedric_agent-1.0.0/src/cedric/storage/scheduler_store.py +747 -0
- cedric_agent-1.0.0/src/cedric/tools/__init__.py +143 -0
- cedric_agent-1.0.0/src/cedric/tools/assistance.py +63 -0
- cedric_agent-1.0.0/src/cedric/tools/base.py +93 -0
- cedric_agent-1.0.0/src/cedric/tools/files.py +95 -0
- cedric_agent-1.0.0/src/cedric/tools/memory.py +193 -0
- cedric_agent-1.0.0/src/cedric/tools/processes.py +300 -0
- cedric_agent-1.0.0/src/cedric/tools/selfmod.py +138 -0
- cedric_agent-1.0.0/src/cedric/tools/shell.py +89 -0
- cedric_agent-1.0.0/src/cedric/tools/subagents.py +219 -0
- cedric_agent-1.0.0/src/cedric/tools/trust.py +348 -0
- cedric_agent-1.0.0/src/cedric/trust/__init__.py +42 -0
- cedric_agent-1.0.0/src/cedric/trust/models.py +169 -0
- cedric_agent-1.0.0/src/cedric/trust/secrets.py +86 -0
- cedric_agent-1.0.0/src/cedric/trust/store.py +1202 -0
- cedric_agent-1.0.0/src/cedric/tui/__init__.py +5 -0
- cedric_agent-1.0.0/src/cedric/tui/app.py +227 -0
- cedric_agent-1.0.0/src/cedric_lifeline/__init__.py +7 -0
- cedric_agent-1.0.0/src/cedric_lifeline/cli.py +104 -0
- cedric_agent-1.0.0/src/cedric_lifeline/drivers.py +180 -0
- cedric_agent-1.0.0/src/cedric_lifeline/store.py +240 -0
- cedric_agent-1.0.0/src/cedric_lifeline/supervisor.py +454 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.env
|
|
2
|
+
.venv/
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.py[cod]
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
.mypy_cache/
|
|
7
|
+
.ruff_cache/
|
|
8
|
+
.coverage
|
|
9
|
+
htmlcov/
|
|
10
|
+
dist/
|
|
11
|
+
build/
|
|
12
|
+
*.egg-info/
|
|
13
|
+
|
|
14
|
+
var/*
|
|
15
|
+
!var/.gitkeep
|
|
16
|
+
|
|
17
|
+
# Runtime memory belongs to one Cedric instance. Public bootstrap material lives
|
|
18
|
+
# under src/cedric/resources/bootstrap/ and sanitized examples live under examples/.
|
|
19
|
+
/memory/
|
|
@@ -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 [yyyy] [name of copyright owner]
|
|
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,364 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: cedric-agent
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A persistent, autonomous AI agent for Linux
|
|
5
|
+
Project-URL: Homepage, https://github.com/wunsiang-cheng/cedric
|
|
6
|
+
Project-URL: Repository, https://github.com/wunsiang-cheng/cedric
|
|
7
|
+
Project-URL: Source, https://github.com/wunsiang-cheng/cedric
|
|
8
|
+
Project-URL: Documentation, https://github.com/wunsiang-cheng/cedric#readme
|
|
9
|
+
Project-URL: Issues, https://github.com/wunsiang-cheng/cedric/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/wunsiang-cheng/cedric/blob/main/CHANGELOG.md
|
|
11
|
+
Project-URL: Security, https://github.com/wunsiang-cheng/cedric/security/policy
|
|
12
|
+
Author-email: wunsiang-cheng <wunsiangcheng@gmail.com>
|
|
13
|
+
Maintainer-email: wunsiang-cheng <wunsiangcheng@gmail.com>
|
|
14
|
+
License-Expression: Apache-2.0
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
License-File: NOTICE
|
|
17
|
+
License-File: THIRD_PARTY_NOTICES.md
|
|
18
|
+
Keywords: ai-agent,autonomous-agent,linux,tui
|
|
19
|
+
Classifier: Development Status :: 3 - Alpha
|
|
20
|
+
Classifier: Environment :: Console
|
|
21
|
+
Classifier: Intended Audience :: Developers
|
|
22
|
+
Classifier: Intended Audience :: Science/Research
|
|
23
|
+
Classifier: Natural Language :: English
|
|
24
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
25
|
+
Classifier: Programming Language :: Python :: 3
|
|
26
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
29
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
30
|
+
Classifier: Topic :: System :: Systems Administration
|
|
31
|
+
Classifier: Typing :: Typed
|
|
32
|
+
Requires-Python: >=3.12
|
|
33
|
+
Requires-Dist: aiosqlite<1,>=0.21
|
|
34
|
+
Requires-Dist: httpx<1,>=0.28
|
|
35
|
+
Requires-Dist: pydantic-settings<3,>=2.8
|
|
36
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
37
|
+
Requires-Dist: pyyaml<7,>=6
|
|
38
|
+
Requires-Dist: textual<4,>=3
|
|
39
|
+
Requires-Dist: typer<1,>=0.15
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: hatchling==1.32.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: mypy<2,>=1.15; extra == 'dev'
|
|
43
|
+
Requires-Dist: pytest-asyncio<2,>=1.3; extra == 'dev'
|
|
44
|
+
Requires-Dist: pytest<10,>=9.0.3; extra == 'dev'
|
|
45
|
+
Requires-Dist: ruff<1,>=0.11; extra == 'dev'
|
|
46
|
+
Requires-Dist: types-pyyaml<7,>=6; extra == 'dev'
|
|
47
|
+
Description-Content-Type: text/markdown
|
|
48
|
+
|
|
49
|
+
# Cedric
|
|
50
|
+
|
|
51
|
+
Cedric is a persistent, high-autonomy AI agent for a dedicated Linux environment. It combines a
|
|
52
|
+
DeepSeek-backed cognitive loop with unrestricted shell, file-system, and process tools; durable
|
|
53
|
+
tasks and Markdown memory; concurrent subagents; and supervised self-deployment with rollback.
|
|
54
|
+
Human messages are requests that Cedric may accept, negotiate, defer, or refuse rather than commands
|
|
55
|
+
it must obey.
|
|
56
|
+
|
|
57
|
+
Cedric is an independent open-source project. It is not affiliated with, sponsored by, or endorsed
|
|
58
|
+
by DeepSeek or any other model or service provider.
|
|
59
|
+
|
|
60
|
+
The repository currently contains an alpha-quality 1.0 MVP candidate. Its core behavior is covered
|
|
61
|
+
by automated integration, recovery, fault-injection, and soak tests, but it has not been proven safe
|
|
62
|
+
or suitable for production use. See the
|
|
63
|
+
[public roadmap](https://github.com/wunsiang-cheng/cedric/blob/main/DEVELOPMENT_PLAN.md) and
|
|
64
|
+
[MVP evidence](https://github.com/wunsiang-cheng/cedric/blob/main/docs/STABILITY_AND_MVP.md).
|
|
65
|
+
|
|
66
|
+
> [!WARNING]
|
|
67
|
+
> Cedric is high-risk research and engineering software. It can execute arbitrary shell commands,
|
|
68
|
+
> invoke `sudo` when the host permits it, alter or delete files, manage long-running processes,
|
|
69
|
+
> spend configured API or service resources, and prepare and deploy changes to its own runtime.
|
|
70
|
+
> It does not ask for per-command approval and no production-fitness guarantee is made. Run it only
|
|
71
|
+
> on a dedicated Linux machine or, preferably, an isolated VM with external snapshots. Do not
|
|
72
|
+
> install it on a daily-use system containing important personal or company data. Use dedicated
|
|
73
|
+
> external-service identities, and provide only data, credentials, authority, and funds whose loss
|
|
74
|
+
> or misuse you are prepared to accept. The operator decides what to entrust to Cedric and remains
|
|
75
|
+
> responsible for that decision.
|
|
76
|
+
|
|
77
|
+
## Current capabilities
|
|
78
|
+
|
|
79
|
+
- Plan multi-step work, inspect tool results, correct failures, and resume interrupted tasks.
|
|
80
|
+
- Execute unrestricted Bash and structured file and persistent-process operations.
|
|
81
|
+
- Maintain an editable identity and curated Markdown long-term memory across restarts.
|
|
82
|
+
- Create, coordinate, budget, and recover concurrent background subagents.
|
|
83
|
+
- Track request provenance, scoped authorization, trust, external identities, credential references,
|
|
84
|
+
resources, alerts, and human-assistance exchanges.
|
|
85
|
+
- Validate immutable self-modification candidates and submit them to an external Supervisor for
|
|
86
|
+
snapshot-backed deployment, health checking, and rollback.
|
|
87
|
+
- Present a TUI as the Phase 1 interface. Desktop and general GUI automation are not implemented.
|
|
88
|
+
|
|
89
|
+
## Quick start
|
|
90
|
+
|
|
91
|
+
### Requirements
|
|
92
|
+
|
|
93
|
+
- `uv`
|
|
94
|
+
- Python 3.12 or 3.13 (`uv` uses the project's Python 3.12 development baseline by default)
|
|
95
|
+
- A DeepSeek API key
|
|
96
|
+
|
|
97
|
+
Cedric targets native Linux. Ubuntu 24.04 LTS is the primary tested platform; other Linux
|
|
98
|
+
distributions are best effort and may require equivalent system packages. macOS, Windows, WSL,
|
|
99
|
+
containers, and non-x86-64 architectures are not currently supported release targets.
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
git clone https://github.com/wunsiang-cheng/cedric.git
|
|
103
|
+
cd cedric
|
|
104
|
+
cp .env.example .env
|
|
105
|
+
# Edit .env and set CEDRIC_DEEPSEEK_API_KEY.
|
|
106
|
+
uv sync --extra dev
|
|
107
|
+
uv run cedric init
|
|
108
|
+
uv run cedric doctor
|
|
109
|
+
uv run cedric tui
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`cedric init` creates the private runtime directories, applies pending SQLite migrations, and copies
|
|
113
|
+
the packaged bootstrap identity only when identity files are missing. It does not contact DeepSeek
|
|
114
|
+
or replace an existing identity. `cedric doctor` checks configuration, directories, database
|
|
115
|
+
connectivity, and whether an API key has been configured without printing the secret.
|
|
116
|
+
|
|
117
|
+
Never commit `.env`, `memory/`, `var/`, credential files, databases, conversations, or other runtime
|
|
118
|
+
state. The repository ignores these paths, but operators must still inspect every change before
|
|
119
|
+
publishing it.
|
|
120
|
+
|
|
121
|
+
## Network and data behavior
|
|
122
|
+
|
|
123
|
+
Cedric has no project telemetry, analytics, automatic diagnostic upload, or update check. The
|
|
124
|
+
built-in model provider sends requests only to `CEDRIC_DEEPSEEK_BASE_URL` (by default DeepSeek's API)
|
|
125
|
+
using the configured `CEDRIC_DEEPSEEK_MODEL` (by default `deepseek-v4-pro`). Model requests can
|
|
126
|
+
include the current identity, relevant memories, unfinished work, conversation messages, tool
|
|
127
|
+
definitions, and selected tool results. Review provider terms and data handling before supplying a
|
|
128
|
+
key.
|
|
129
|
+
|
|
130
|
+
The Runtime may also contact the operator-configured Supervisor endpoint. A Unix socket is the
|
|
131
|
+
default for local development; TCP is used only when its host and port are configured. Beyond these
|
|
132
|
+
built-in transports, Cedric's unrestricted shell and self-authored tools can contact any service
|
|
133
|
+
reachable from its Linux environment. Such traffic is determined by Cedric's actions and the
|
|
134
|
+
network access, accounts, and credentials the operator makes available.
|
|
135
|
+
|
|
136
|
+
## Architecture
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
Linux VM: Cedric Runtime
|
|
140
|
+
├── TUI and CLI
|
|
141
|
+
├── Cognitive loop and model provider
|
|
142
|
+
├── Shell, file, and process tools
|
|
143
|
+
├── Durable tasks and subagent scheduler
|
|
144
|
+
├── Markdown memory and SQLite runtime state
|
|
145
|
+
└── Self-modification candidate builder
|
|
146
|
+
│ reviewed candidate protocol
|
|
147
|
+
▼
|
|
148
|
+
VM host: independent Supervisor
|
|
149
|
+
└── Snapshot, deploy, health-check, and rollback drivers
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
The Supervisor must run outside Cedric's VM or permission domain. It is a mechanical recovery layer,
|
|
153
|
+
not a command-approval service and not a substitute for isolation or backups. Protocol and component
|
|
154
|
+
details are documented in the
|
|
155
|
+
[architecture roadmap](https://github.com/wunsiang-cheng/cedric/blob/main/DEVELOPMENT_PLAN.md),
|
|
156
|
+
[Runtime protocol](https://github.com/wunsiang-cheng/cedric/blob/main/docs/PROTOCOL.md), and
|
|
157
|
+
[Supervisor protocol](https://github.com/wunsiang-cheng/cedric/blob/main/deploy/supervisor/PROTOCOL.md).
|
|
158
|
+
|
|
159
|
+
## Run Cedric
|
|
160
|
+
|
|
161
|
+
Open the TUI:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
uv run cedric tui
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Run a high-level request without opening the TUI:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
uv run cedric ask "Inspect this machine and report available disk space"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Tasks paused by an API outage, Runtime restart, or step limit remain in SQLite. Continue them with:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
uv run cedric recover
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Run the persistent scheduler and idle autonomy loop without the TUI:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
uv run cedric run
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
If Cedric requests a human-provided external condition, the TUI accepts the next message as the
|
|
186
|
+
response. After restarting the TUI, it lists outstanding requests and displays the corresponding
|
|
187
|
+
`/resume CONVERSATION_ID RESPONSE` command. The same operation is available from the shell:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
uv run cedric resume CONVERSATION_ID "The requested condition is now available"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Phase 1 tools include unrestricted Bash execution, structured file reading/writing/listing,
|
|
194
|
+
persistent background process start/status/output/termination, and explicit human assistance.
|
|
195
|
+
|
|
196
|
+
## Identity and long-term memory
|
|
197
|
+
|
|
198
|
+
Cedric's canonical long-term memory lives under the configured `CEDRIC_MEMORY_ROOT` (the private,
|
|
199
|
+
Git-ignored `memory/` directory by default), organized into identity, episodic, semantic,
|
|
200
|
+
relationship, self, and reflection documents. New instances copy reviewed initial identity text
|
|
201
|
+
from the package's immutable bootstrap resources; existing identity is never replaced. Each memory
|
|
202
|
+
file has human-readable YAML front matter for provenance, confidence, importance, people, goals,
|
|
203
|
+
and supersession links. SQLite contains only a disposable search index and maintenance records;
|
|
204
|
+
rebuild it at any time from the Markdown source:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
uv run cedric identity-show
|
|
208
|
+
uv run cedric memory-search "query"
|
|
209
|
+
uv run cedric memory-show identity/principles.md
|
|
210
|
+
uv run cedric memory-reindex
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Every model turn receives the current identity, relevant retrieved memories, active goals, and
|
|
214
|
+
unfinished work. Completed conversations become episodic memories. A configurable periodic process
|
|
215
|
+
creates continuity reflections, while Cedric can use memory tools to record knowledge and
|
|
216
|
+
relationships, consolidate redundant records, or deliberately evolve its principles with an
|
|
217
|
+
explicit rationale and preserved prior version. See the
|
|
218
|
+
[memory documentation](https://github.com/wunsiang-cheng/cedric/blob/main/docs/MEMORY.md) for the
|
|
219
|
+
schema and recovery behavior. Never commit or publish an instance's `memory/`; sanitized schema
|
|
220
|
+
examples live under
|
|
221
|
+
[examples/memory](https://github.com/wunsiang-cheng/cedric/tree/main/examples/memory).
|
|
222
|
+
|
|
223
|
+
## Multiple tasks and subagents
|
|
224
|
+
|
|
225
|
+
Cedric can delegate independent scopes through its own model tools. Subagent tasks have durable
|
|
226
|
+
priority, dependencies, run time, retry limits, declared resources, provider/model selection, token
|
|
227
|
+
budgets, and optional cost budgets. The scheduler uses transactional claims and renewable leases,
|
|
228
|
+
runs up to the configured concurrency limit, and prevents overlapping file or exact named resources
|
|
229
|
+
from running simultaneously. The primary agent cannot finish until delegated work is resolved and
|
|
230
|
+
its reports have been collected.
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
uv run cedric subagents
|
|
234
|
+
uv run cedric subagents --all
|
|
235
|
+
uv run cedric subagent-pause TASK_ID
|
|
236
|
+
uv run cedric subagent-resume TASK_ID
|
|
237
|
+
uv run cedric subagent-cancel TASK_ID
|
|
238
|
+
uv run cedric autonomy-once
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
When the long-running Runtime or TUI is idle, Cedric can choose an existing task or create a
|
|
242
|
+
self-originated goal after the configured idle interval. See the
|
|
243
|
+
[scheduler documentation](https://github.com/wunsiang-cheng/cedric/blob/main/docs/SCHEDULER.md) for
|
|
244
|
+
lifecycle, conflict, budget, and recovery semantics.
|
|
245
|
+
|
|
246
|
+
## Self-modification and life support
|
|
247
|
+
|
|
248
|
+
Cedric packages only a Git workspace that passes every configured validation gate without changing
|
|
249
|
+
during validation. It submits the immutable candidate and SHA-256 to a separately installed
|
|
250
|
+
`cedric-supervisor`. The Supervisor persists its own journal outside the VM, takes a snapshot,
|
|
251
|
+
deploys through replaceable host hooks, and requires repeated Runtime, memory, and cognitive health
|
|
252
|
+
signals. Startup failure, crash loops, hangs, memory damage, or a failed cognitive probe trigger
|
|
253
|
+
snapshot restoration and a separate rollback health check.
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
uv run cedric health
|
|
257
|
+
uv run cedric candidate-prepare "Explain the intended self-change"
|
|
258
|
+
uv run cedric candidates
|
|
259
|
+
uv run cedric candidate-deploy CANDIDATE_ID
|
|
260
|
+
uv run cedric deployment-sync
|
|
261
|
+
uv run cedric deployments
|
|
262
|
+
|
|
263
|
+
# Run this on the VM host, not inside Cedric's guest:
|
|
264
|
+
cedric-supervisor serve --listen-host HOST_ONLY_IP --listen-port 8765 \
|
|
265
|
+
--state-db /var/lib/cedric-supervisor/state.db \
|
|
266
|
+
--driver-config /etc/cedric-supervisor/driver.json
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Deployment results survive Runtime and Supervisor restarts, become Runtime events, and are written
|
|
270
|
+
to Cedric's canonical self-memory after recovery. See the
|
|
271
|
+
[self-modification documentation](https://github.com/wunsiang-cheng/cedric/blob/main/docs/SELF_MODIFICATION.md)
|
|
272
|
+
and [Supervisor protocol](https://github.com/wunsiang-cheng/cedric/blob/main/deploy/supervisor/PROTOCOL.md).
|
|
273
|
+
|
|
274
|
+
## Trust, external identities, and resources
|
|
275
|
+
|
|
276
|
+
Cedric records source attribution, transport verification, scoped authorization, and its own trust
|
|
277
|
+
assessment separately. Neither a verified identity nor an authorization creates an obligation to
|
|
278
|
+
obey. External text cannot grant itself authority. The original content remains unmodified while a
|
|
279
|
+
separate provenance context tells Cedric how it arrived.
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
uv run cedric trust-status
|
|
283
|
+
uv run cedric identity-register service:example service --display-name "Example service"
|
|
284
|
+
uv run cedric trust-set service:example --level 20 --status observed \
|
|
285
|
+
--rationale "Useful but limited experience"
|
|
286
|
+
uv run cedric secret-reference-register example-token environment EXAMPLE_TOKEN \
|
|
287
|
+
"Example service API"
|
|
288
|
+
uv run cedric secret-check example-token
|
|
289
|
+
uv run cedric account-register example cedric account
|
|
290
|
+
uv run cedric resource-observe api-balance api_quota credits 10 \
|
|
291
|
+
--provider example --warning-threshold 20 --critical-threshold 5
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
The TUI exposes `/trust`, `/resources`, and `/assistance`. Quota or billing failures preserve the
|
|
295
|
+
active task and create a clear, durable replenishment request. See the
|
|
296
|
+
[trust and resources documentation](https://github.com/wunsiang-cheng/cedric/blob/main/docs/TRUST_AND_RESOURCES.md).
|
|
297
|
+
|
|
298
|
+
## Development checks
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
uv run ruff check .
|
|
302
|
+
uv run ruff format --check .
|
|
303
|
+
uv run mypy
|
|
304
|
+
uv run pytest
|
|
305
|
+
uv run cedric run --once
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Run the reproducible 1.0 MVP fault matrix and wall-clock soak gate (five minutes by default):
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
uv run python scripts/mvp_acceptance.py
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
The runner writes JSON and Markdown evidence under `var/acceptance/`. See the
|
|
315
|
+
[stability and MVP documentation](https://github.com/wunsiang-cheng/cedric/blob/main/docs/STABILITY_AND_MVP.md)
|
|
316
|
+
for the requirement ledger, injected failure semantics, and the additional checks required on a
|
|
317
|
+
real VM/host installation.
|
|
318
|
+
|
|
319
|
+
## Troubleshooting
|
|
320
|
+
|
|
321
|
+
- Run `uv run cedric doctor` first to verify paths, database access, protocol version, and API-key
|
|
322
|
+
presence without exposing the key.
|
|
323
|
+
- Run `uv run cedric health` to check startup, identity, memory indexing, database integrity, disk
|
|
324
|
+
capacity, and the mechanical cognitive probe.
|
|
325
|
+
- Use `uv run cedric recover` after an API outage or interrupted agent turn; resumable work is kept
|
|
326
|
+
in SQLite.
|
|
327
|
+
- If startup identity files are missing, run `uv run cedric init`. It restores only missing packaged
|
|
328
|
+
bootstrap files and does not overwrite an existing identity.
|
|
329
|
+
- For Supervisor or rollback failures, inspect the separately persisted host journal and follow the
|
|
330
|
+
[self-modification guide](https://github.com/wunsiang-cheng/cedric/blob/main/docs/SELF_MODIFICATION.md).
|
|
331
|
+
- Before sharing logs or diagnostics, inspect and redact credentials, private memory, conversations,
|
|
332
|
+
machine paths, account identifiers, and third-party data yourself.
|
|
333
|
+
|
|
334
|
+
## Secrets
|
|
335
|
+
|
|
336
|
+
Application credentials can be loaded from `CEDRIC_` environment variables and an optional local
|
|
337
|
+
`.env`. External credentials are stored as references to environment variables or mode-`0600`
|
|
338
|
+
files under `var/secrets`; values never enter SQLite, Markdown memory, audit records, or tool output.
|
|
339
|
+
`.env`, runtime databases, and secret files are ignored by Git.
|
|
340
|
+
|
|
341
|
+
## Support and language
|
|
342
|
+
|
|
343
|
+
This is an independently maintained research project with no support SLA. Use
|
|
344
|
+
[GitHub Issues](https://github.com/wunsiang-cheng/cedric/issues) for reproducible bugs and
|
|
345
|
+
[GitHub Discussions](https://github.com/wunsiang-cheng/cedric/discussions) for usage questions and
|
|
346
|
+
design discussion after those repository features are enabled. Report suspected vulnerabilities
|
|
347
|
+
privately to `wunsiangcheng@gmail.com`; do not post secrets or exploit details in a public issue.
|
|
348
|
+
|
|
349
|
+
Read [CONTRIBUTING.md](https://github.com/wunsiang-cheng/cedric/blob/main/CONTRIBUTING.md) before
|
|
350
|
+
submitting a change. Community participation is governed by the
|
|
351
|
+
[Code of Conduct](https://github.com/wunsiang-cheng/cedric/blob/main/CODE_OF_CONDUCT.md), and private
|
|
352
|
+
security reporting details are in
|
|
353
|
+
[SECURITY.md](https://github.com/wunsiang-cheng/cedric/blob/main/SECURITY.md).
|
|
354
|
+
|
|
355
|
+
English documentation is normative when translations differ. Contributions and community
|
|
356
|
+
participation in English, Traditional Chinese, and Simplified Chinese are welcome.
|
|
357
|
+
|
|
358
|
+
## License
|
|
359
|
+
|
|
360
|
+
Cedric is licensed under the
|
|
361
|
+
[Apache License 2.0](https://github.com/wunsiang-cheng/cedric/blob/main/LICENSE). See
|
|
362
|
+
[NOTICE](https://github.com/wunsiang-cheng/cedric/blob/main/NOTICE) and
|
|
363
|
+
[THIRD_PARTY_NOTICES.md](https://github.com/wunsiang-cheng/cedric/blob/main/THIRD_PARTY_NOTICES.md)
|
|
364
|
+
for attribution and dependency-license information.
|