nanocode-cli 0.5.4__tar.gz → 0.5.7__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.
@@ -1,3 +1,3 @@
1
1
  include LICENSE
2
- prune demo
2
+ prune demo*
3
3
  prune tests
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nanocode-cli
3
- Version: 0.5.4
3
+ Version: 0.5.7
4
4
  Summary: A small terminal coding agent written in Python
5
5
  Author-email: hit9 <hit9@icloud.com>
6
6
  License-Expression: BSD-3-Clause
@@ -42,12 +42,13 @@ nanocode is pre-1.0 software. Commands, configuration, and tool behavior may cha
42
42
 
43
43
  ## Features
44
44
 
45
- - **Snapshot context**: Every turn starts from a clean workspace snapshot instead of a bloated chat replay.
46
- - **File memory**: Recent reads and edits stay available as focused, line-numbered file ranges.
45
+ - **Current turn flow**: Interim answers, tool results, and appended user input stay in order during a running task.
46
+ - **Latest file state**: `Read` and `Edit` maintain a current, line-numbered file view with stale-range checks.
47
47
  - **Anchored edits**: `line:hash` anchors catch stale edits before they touch the wrong code.
48
+ - **Working memory**: `Note` keeps the active goal, plan, and known facts separate from noisy tool output.
48
49
  - **Symbol index**: Jump from names to outlines, references, and changed files without searching blindly.
49
- - **Tool recall**: Big outputs are bounded in the prompt but still recallable later by `tr.N`.
50
- - **Terminal-native UI**: Model picking, history search, confirmations, live command output, and status all stay in the terminal.
50
+ - **Tool recall**: Prompt output is bounded, while raw `tr.N` results remain recallable when needed.
51
+ - **Terminal-native UI**: Model picking, history search, confirmations, live command output, appended input, and status stay in the terminal.
51
52
 
52
53
  ## Install
53
54
 
@@ -77,6 +78,8 @@ Useful arguments:
77
78
  - `--yolo`: skip confirmations for mutating tools.
78
79
  - `-v`, `--version`: show the version.
79
80
 
81
+ During a running turn, the `+>` prompt accepts follow-up input for the next model request.
82
+
80
83
  ## Commands
81
84
 
82
85
  - `/help`: show commands and tools.
@@ -99,9 +102,10 @@ Interactive selectors support `j`/`k`, arrows, `/` search, Enter, and Esc. Input
99
102
 
100
103
  - File: `Read`, `LineCount`, `List`, `Find`, `Search`.
101
104
  - Code index: `InspectCode`.
102
- - Edit: `CreateFile`, `Edit`.
105
+ - Edit: `Edit` creates or patches file content.
103
106
  - Shell: `Bash`, `Git`.
104
- - Tool results: `Recall`, `Forget`.
107
+ - Tool results: `Recall`.
108
+ - Working notes: `Note`.
105
109
 
106
110
  `Read`, `Search`, and `InspectCode` return line anchors where useful. `Edit` uses current `line:hash` anchors to reject stale edits.
107
111
 
@@ -126,7 +130,7 @@ Main fields:
126
130
 
127
131
  ## Context Design
128
132
 
129
- Each model request is built manually as one system message and one user message. The user message is a structured context snapshot, ordered from stable sections to volatile sections so provider prompt caching can reuse the prefix.
133
+ Each model request is built manually from explicit messages. Stable context comes first, conversation stays as messages, working memory follows, and the latest file state is appended at the end.
130
134
 
131
135
  ```text
132
136
  model request
@@ -136,27 +140,27 @@ model request
136
140
  +--------------------------------------------------+
137
141
  | user |
138
142
  | Environment |
139
- | State |
140
- | Summary |
141
- | Recent Conversation |
142
- | Tool Result Index |
143
- | File Context |
144
- | Discovery Context |
145
- | Error Feedback |
146
- | Latest Tool Results |
147
- | Current Turn Conversation |
143
+ +--------------------------------------------------+
144
+ | user/assistant |
145
+ | conversation, compacted summaries, tools |
146
+ +--------------------------------------------------+
147
+ | user |
148
+ | Memory: goal, plan, known, date |
149
+ +--------------------------------------------------+
150
+ | user |
151
+ | FILE STATE: latest Read/Edit file view |
148
152
  +--------------------------------------------------+
149
153
  ```
150
154
 
151
155
  Core rules:
152
156
 
153
- - File Context is rebuilt dynamically from active `Read` and `Edit` results.
157
+ - Mid-turn assistant text and appended user input are kept as conversation.
158
+ - Earlier conversation is compacted into an explicit summary when the context grows too large.
159
+ - FILE STATE is updated by successful `Read` and `Edit` tools and shows current listed file ranges, with recent files first.
154
160
  - Newer file lines overwrite older lines; edit invalidations clear stale ranges.
155
161
  - File lines are checked against current file stat or line hash before being shown.
156
- - Discovery Context contains `Find`, `Search`, and `InspectCode` leads, not source truth.
157
- - Large tool outputs are bounded in context and can be recalled by `tr.N`.
158
- - Error Feedback keeps only recent failed tool calls.
159
- - `Forget` removes stale result keys from the active tool result store.
162
+ - Successful `Read` and `Edit` tool messages point to FILE STATE instead of repeating file bodies.
163
+ - Other tool outputs are bounded in conversation messages and can be recalled by `tr.N`.
160
164
 
161
165
  ## Safety
162
166
 
@@ -8,12 +8,13 @@ nanocode is pre-1.0 software. Commands, configuration, and tool behavior may cha
8
8
 
9
9
  ## Features
10
10
 
11
- - **Snapshot context**: Every turn starts from a clean workspace snapshot instead of a bloated chat replay.
12
- - **File memory**: Recent reads and edits stay available as focused, line-numbered file ranges.
11
+ - **Current turn flow**: Interim answers, tool results, and appended user input stay in order during a running task.
12
+ - **Latest file state**: `Read` and `Edit` maintain a current, line-numbered file view with stale-range checks.
13
13
  - **Anchored edits**: `line:hash` anchors catch stale edits before they touch the wrong code.
14
+ - **Working memory**: `Note` keeps the active goal, plan, and known facts separate from noisy tool output.
14
15
  - **Symbol index**: Jump from names to outlines, references, and changed files without searching blindly.
15
- - **Tool recall**: Big outputs are bounded in the prompt but still recallable later by `tr.N`.
16
- - **Terminal-native UI**: Model picking, history search, confirmations, live command output, and status all stay in the terminal.
16
+ - **Tool recall**: Prompt output is bounded, while raw `tr.N` results remain recallable when needed.
17
+ - **Terminal-native UI**: Model picking, history search, confirmations, live command output, appended input, and status stay in the terminal.
17
18
 
18
19
  ## Install
19
20
 
@@ -43,6 +44,8 @@ Useful arguments:
43
44
  - `--yolo`: skip confirmations for mutating tools.
44
45
  - `-v`, `--version`: show the version.
45
46
 
47
+ During a running turn, the `+>` prompt accepts follow-up input for the next model request.
48
+
46
49
  ## Commands
47
50
 
48
51
  - `/help`: show commands and tools.
@@ -65,9 +68,10 @@ Interactive selectors support `j`/`k`, arrows, `/` search, Enter, and Esc. Input
65
68
 
66
69
  - File: `Read`, `LineCount`, `List`, `Find`, `Search`.
67
70
  - Code index: `InspectCode`.
68
- - Edit: `CreateFile`, `Edit`.
71
+ - Edit: `Edit` creates or patches file content.
69
72
  - Shell: `Bash`, `Git`.
70
- - Tool results: `Recall`, `Forget`.
73
+ - Tool results: `Recall`.
74
+ - Working notes: `Note`.
71
75
 
72
76
  `Read`, `Search`, and `InspectCode` return line anchors where useful. `Edit` uses current `line:hash` anchors to reject stale edits.
73
77
 
@@ -92,7 +96,7 @@ Main fields:
92
96
 
93
97
  ## Context Design
94
98
 
95
- Each model request is built manually as one system message and one user message. The user message is a structured context snapshot, ordered from stable sections to volatile sections so provider prompt caching can reuse the prefix.
99
+ Each model request is built manually from explicit messages. Stable context comes first, conversation stays as messages, working memory follows, and the latest file state is appended at the end.
96
100
 
97
101
  ```text
98
102
  model request
@@ -102,27 +106,27 @@ model request
102
106
  +--------------------------------------------------+
103
107
  | user |
104
108
  | Environment |
105
- | State |
106
- | Summary |
107
- | Recent Conversation |
108
- | Tool Result Index |
109
- | File Context |
110
- | Discovery Context |
111
- | Error Feedback |
112
- | Latest Tool Results |
113
- | Current Turn Conversation |
109
+ +--------------------------------------------------+
110
+ | user/assistant |
111
+ | conversation, compacted summaries, tools |
112
+ +--------------------------------------------------+
113
+ | user |
114
+ | Memory: goal, plan, known, date |
115
+ +--------------------------------------------------+
116
+ | user |
117
+ | FILE STATE: latest Read/Edit file view |
114
118
  +--------------------------------------------------+
115
119
  ```
116
120
 
117
121
  Core rules:
118
122
 
119
- - File Context is rebuilt dynamically from active `Read` and `Edit` results.
123
+ - Mid-turn assistant text and appended user input are kept as conversation.
124
+ - Earlier conversation is compacted into an explicit summary when the context grows too large.
125
+ - FILE STATE is updated by successful `Read` and `Edit` tools and shows current listed file ranges, with recent files first.
120
126
  - Newer file lines overwrite older lines; edit invalidations clear stale ranges.
121
127
  - File lines are checked against current file stat or line hash before being shown.
122
- - Discovery Context contains `Find`, `Search`, and `InspectCode` leads, not source truth.
123
- - Large tool outputs are bounded in context and can be recalled by `tr.N`.
124
- - Error Feedback keeps only recent failed tool calls.
125
- - `Forget` removes stale result keys from the active tool result store.
128
+ - Successful `Read` and `Edit` tool messages point to FILE STATE instead of repeating file bodies.
129
+ - Other tool outputs are bounded in conversation messages and can be recalled by `tr.N`.
126
130
 
127
131
  ## Safety
128
132