continualcode 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: continualcode
3
+ Version: 0.1.0
4
+ Summary: Human-in-the-loop coding agent with online learning via prompt distillation
5
+ Project-URL: Homepage, https://github.com/sdan/continualcode
6
+ Project-URL: Repository, https://github.com/sdan/continualcode
7
+ Author-email: Surya Dantuluri <surya@prava.dev>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: claude-code,coding-agent,context-distillation,fine-tuning,llm,prompt-distillation,rlhf,tui
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Classifier: Topic :: Software Development
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: textual>=0.40.0
23
+ Requires-Dist: tinker-cookbook>=0.1.0
24
+ Requires-Dist: torch>=2.0.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
27
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # ContinualCode
31
+
32
+ Human-in-the-loop coding agent with online learning via prompt distillation.
33
+
34
+ A Claude Code-style TUI that learns from your approvals. When you approve or edit a tool call, the model trains on that feedback in real-time.
35
+
36
+ ## Features
37
+
38
+ - **Claude Code-style approval UI** - 4-option selection with keyboard navigation
39
+ - **Online prompt distillation** - Model learns to internalize policy without needing the policy prompt
40
+ - **Permission memory** - "Don't ask again" for trusted directories
41
+ - **Correction feedback** - Type what the model should have done (for DPO training)
42
+ - **Checkpoint save/load** - Ctrl+S to save, resume later with `--checkpoint`
43
+
44
+ ## Install
45
+
46
+ ```bash
47
+ pip install continualcode
48
+ ```
49
+
50
+ ## Quick Start
51
+
52
+ ```bash
53
+ # Run the TUI
54
+ continualcode
55
+
56
+ # With a custom policy file
57
+ continualcode --policy ./my_rules.md
58
+
59
+ # Resume from checkpoint
60
+ continualcode --checkpoint ./checkpoints/step_000100
61
+
62
+ # Inference only (no training)
63
+ continualcode --no-training
64
+ ```
65
+
66
+ ## Environment Variables
67
+
68
+ | Variable | Default | Description |
69
+ |----------|---------|-------------|
70
+ | `MODEL` | `Qwen/Qwen3-4B-Instruct-2507` | Base model |
71
+ | `TINKER_URL` | `None` | Tinker service URL |
72
+ | `TINKER_API_KEY` | `None` | Tinker API key |
73
+ | `ENABLE_TRAINING` | `1` | Enable LoRA training |
74
+ | `LEARNING_RATE` | `1e-5` | Adam learning rate |
75
+ | `LORA_RANK` | `32` | LoRA rank |
76
+ | `POLICY_PATH` | `./policy_memory.md` | Policy file injected into teacher prefix |
77
+ | `DISTILL_MODE` | `on_policy` | `on_policy` or `off_policy` |
78
+ | `CHECKPOINT_DIR` | `./checkpoints` | Where Ctrl+S saves checkpoints |
79
+ | `LOAD_CHECKPOINT` | `""` | Checkpoint to load on startup |
80
+
81
+ ## How It Works
82
+
83
+ **Prompt distillation** trains a model to behave *as if* it had access to a long policy prompt, without actually needing it at inference time:
84
+
85
+ 1. **Generation** uses a "teacher" prefix that includes your policy file
86
+ 2. **Training** uses a "student" prefix without the policy
87
+ 3. The model learns to produce the same (approved) outputs without the policy context
88
+
89
+ Two distillation modes:
90
+ - `off_policy`: Classic SFT on approved outputs
91
+ - `on_policy`: Sample from student, score with teacher logprobs, update via importance sampling
92
+
93
+ ## Keybindings
94
+
95
+ | Key | Action |
96
+ |-----|--------|
97
+ | `Enter` | Send message |
98
+ | `Ctrl+S` | Save checkpoint |
99
+ | `Ctrl+L` | Clear conversation |
100
+ | `Ctrl+C` | Quit |
101
+ | `?` | Show help |
102
+
103
+ **Approval UI:**
104
+ | Key | Action |
105
+ |-----|--------|
106
+ | `1` / `y` | Approve |
107
+ | `2` / `Shift+Tab` | Approve + remember |
108
+ | `3` / `n` / `Esc` | Deny |
109
+ | `4` / `Tab` | Type correction |
110
+ | `e` | Edit args in $EDITOR |
111
+ | Arrow keys | Navigate options |
112
+
113
+ ## License
114
+
115
+ MIT
@@ -0,0 +1,10 @@
1
+ continualcode/__init__.py,sha256=8bb5ZLwxGZTDUryMfwnZGZWih_zdGaXLRve6lq4Pg6o,416
2
+ continualcode/cli.py,sha256=KUE3U0EsGAVf7iB7Pk4nICuMN9pb6AuZ0bh_5h14WrQ,1629
3
+ continualcode/session.py,sha256=eshYz61UPyOyf5wunJ_4bF3ML-eQWvJesDHoeKatQ_U,14464
4
+ continualcode/tools.py,sha256=74oIupQSMK-dnBsIVcFN0B8SDGzBrYUnuKYxEfIAIsg,7323
5
+ continualcode/tui.py,sha256=SOX-sxzqfDqa9rzUOGVCBJQi_IvQZUQv6UmBc73okEs,36285
6
+ continualcode-0.1.0.dist-info/METADATA,sha256=Rx54Y1-IF4WNzGxpp0wWe4cK8c7rrc6YNerGAylBSts,3864
7
+ continualcode-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
8
+ continualcode-0.1.0.dist-info/entry_points.txt,sha256=JtZQRyWEwUxF5qDGNxbR6hhcb_40m0YueA_x7iklQbc,57
9
+ continualcode-0.1.0.dist-info/licenses/LICENSE,sha256=HlCPHs4n9x-GFIBTfJZIK7OJMVcUBnINaM1BmSgdLdw,1072
10
+ continualcode-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ continualcode = continualcode.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Surya Dantuluri
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.