@loonglab/loongcode-cli 0.1.0 → 0.1.2
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.
- package/CHANGELOG.md +99 -0
- package/README.md +30 -0
- package/dist/loongcode.js +175 -173
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -77,6 +77,105 @@ All notable changes to LoongCode will be documented in this file.
|
|
|
77
77
|
capabilities now live inside the `/session` manager; they are not retained
|
|
78
78
|
as aliases.
|
|
79
79
|
|
|
80
|
+
## [0.1.2] - 2026-10-12
|
|
81
|
+
|
|
82
|
+
A cross-platform compatibility release. Windows gets a real choice of shell —
|
|
83
|
+
Windows PowerShell by default, CMD on request — and the tool layer no longer
|
|
84
|
+
assumes a POSIX userland underneath: file search runs in-process instead of
|
|
85
|
+
shelling out to `grep`, command output is decoded by contract rather than
|
|
86
|
+
assumed to be UTF-8, cancelling a command always returns, and `@file`
|
|
87
|
+
references work with spaces and Windows paths.
|
|
88
|
+
|
|
89
|
+
Verification remains Linux: the automated suite runs there, the Windows paths
|
|
90
|
+
are covered by simulated tests, and native Windows and macOS runs are still
|
|
91
|
+
outstanding.
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
|
|
95
|
+
- **Windows shell selection.** `settings.shell` chooses which shell commands
|
|
96
|
+
run in on Windows: `"powershell"` (Windows PowerShell, the default) or
|
|
97
|
+
`"cmd"` (CMD, taken from `%ComSpec%`). It is global with a per-project
|
|
98
|
+
override, and an explicit choice is never replaced by the default. It applies
|
|
99
|
+
to Windows only — other platforms always run commands in `/bin/sh`, with the
|
|
100
|
+
prompts and tool descriptions they have always had. Nothing switches shells
|
|
101
|
+
automatically: if the selected shell cannot start, the command fails with an
|
|
102
|
+
error naming it instead of running somewhere else, and PowerShell 7 (`pwsh`)
|
|
103
|
+
is never chosen for you. CMD and PowerShell are different languages, so the
|
|
104
|
+
system prompt and the tool description state which one is active.
|
|
105
|
+
|
|
106
|
+
### Changed
|
|
107
|
+
|
|
108
|
+
- **Windows PowerShell is the default shell on Windows.** An installation that
|
|
109
|
+
never set `settings.shell` now runs commands in `powershell.exe` instead of
|
|
110
|
+
CMD; one that already chose `"cmd"` — globally or per project — keeps CMD.
|
|
111
|
+
The change is Windows only.
|
|
112
|
+
- **File search no longer needs an external `grep` binary.** The `grep` tool
|
|
113
|
+
searches in-process, so it works where no `grep` exists — on Windows it
|
|
114
|
+
previously failed with "Executable not found in $PATH", which the agent read
|
|
115
|
+
as "no results". The interface, the output format (matching lines with
|
|
116
|
+
`file:line` prefixes, the 100-match cap, `No matches found.`) and the search
|
|
117
|
+
scope (`.git` and `node_modules` are still searched) are unchanged. Regular
|
|
118
|
+
expressions are JavaScript's rather than POSIX ERE: `\d`, lookahead and
|
|
119
|
+
non-greedy quantifiers now work, while `[[:alpha:]]`, `\<` and `\>` are
|
|
120
|
+
rejected with an error naming the replacement instead of silently matching
|
|
121
|
+
something else. This is not full GNU grep compatibility — the dialect, the
|
|
122
|
+
`include` glob (now the same dialect as `find`, where `{a,b}` alternates) and
|
|
123
|
+
the handling of unreadable paths all differ as described here.
|
|
124
|
+
- **A search that cannot read part of the tree says so, and still returns what
|
|
125
|
+
it found.** Previously a single unreadable path failed the whole search and
|
|
126
|
+
discarded the matches; the result now carries them with a "(Search
|
|
127
|
+
incomplete: …)" note. Special files such as FIFOs and devices are skipped
|
|
128
|
+
rather than read, which removes a way for a search to block indefinitely.
|
|
129
|
+
- **Subprocess output is decoded as UTF-8 unless the whole stream proves
|
|
130
|
+
otherwise.** On Windows, output that is not valid UTF-8 — `cmd.exe`
|
|
131
|
+
built-ins and many native tools write the console code page — is decoded
|
|
132
|
+
with the console code page and the result says which one was used, instead
|
|
133
|
+
of arriving as mojibake. That fallback is a labelled best guess, not
|
|
134
|
+
detection of what a program intended: the console code page describes the
|
|
135
|
+
console, not the program, and a stream can be valid UTF-8 while having been
|
|
136
|
+
written in another encoding. When no code page can be determined, the output
|
|
137
|
+
says that instead of pretending. POSIX decoding is unchanged.
|
|
138
|
+
|
|
139
|
+
### Fixed
|
|
140
|
+
|
|
141
|
+
- **Cancelling a command always returns.** Aborting a run (Esc) settles the
|
|
142
|
+
tool call within a bounded grace period even when the command refuses to
|
|
143
|
+
die; previously a Windows cancellation whose `taskkill` was missing or failed
|
|
144
|
+
could leave the call waiting forever, with no error and no diagnostic.
|
|
145
|
+
Termination is still best-effort — a process or descendant that escapes the
|
|
146
|
+
process tree can survive — and the result says explicitly when cleanup could
|
|
147
|
+
not be confirmed, rather than implying the tree is gone.
|
|
148
|
+
- **`@file` references now work with spaces and Windows paths.** `@"my
|
|
149
|
+
notes.md"` and `@C:\src\a.ts` (either slash) expand to the file's content
|
|
150
|
+
like any other reference; they used to be left as literal text. Unresolved
|
|
151
|
+
references still stay literal, so `@` in ordinary prose is never mangled.
|
|
152
|
+
|
|
153
|
+
## [0.1.1] - 2026-10-12
|
|
154
|
+
|
|
155
|
+
Fixes Backspace in the terminal environments where the key arrives as a raw
|
|
156
|
+
`0x08` byte. It was decoded as Ctrl+Backspace whenever `WT_SESSION` was set —
|
|
157
|
+
an inherited environment variable, not a property of the byte stream — and no
|
|
158
|
+
binding wanted that key, so the editor discarded the byte and nothing was
|
|
159
|
+
deleted. A raw `0x08` now means plain Backspace everywhere; Ctrl+Backspace
|
|
160
|
+
remains distinguishable wherever the terminal encodes it explicitly.
|
|
161
|
+
|
|
162
|
+
### Fixed
|
|
163
|
+
|
|
164
|
+
- Backspace deletes the character before the cursor when the terminal sends
|
|
165
|
+
`0x08` (Windows consoles, mintty/Git Bash, multiplexers, terminals started
|
|
166
|
+
from a Windows Terminal shell), not only when it sends `0x7F`.
|
|
167
|
+
- Ctrl+Backspace is bound to delete-word-backward for terminals that encode it
|
|
168
|
+
unambiguously (Kitty CSI-u, modifyOtherKeys). It previously matched nothing
|
|
169
|
+
at all, on every terminal.
|
|
170
|
+
|
|
171
|
+
### Added
|
|
172
|
+
|
|
173
|
+
- Regression coverage for Backspace across terminal environments
|
|
174
|
+
(`packages/cli/src/interactive/input/backspace.test.ts`): the `0x08`/`0x7F`
|
|
175
|
+
matrix with `WT_SESSION` and the SSH variables present and absent, empty
|
|
176
|
+
input, deletion before the cursor, start-of-line merging, and both
|
|
177
|
+
Alt+Backspace encodings.
|
|
178
|
+
|
|
80
179
|
## [0.1.0] - 2026-09-27
|
|
81
180
|
|
|
82
181
|
First working MiniCode coding-agent baseline: point the terminal UI at a
|
package/README.md
CHANGED
|
@@ -11,6 +11,10 @@ in an interactive terminal UI.
|
|
|
11
11
|
LoongCode is a single platform-independent package: the same install works on
|
|
12
12
|
Windows, macOS, and Linux, on both x64 and arm64.
|
|
13
13
|
|
|
14
|
+
Cross-platform compatibility improvements are implemented and automated
|
|
15
|
+
verification has been performed on Linux; native Windows and macOS verification
|
|
16
|
+
remains pending.
|
|
17
|
+
|
|
14
18
|
```sh
|
|
15
19
|
npm install -g @loonglab/loongcode-cli
|
|
16
20
|
cd my-project
|
|
@@ -44,4 +48,30 @@ Configuration and sessions live under your user config directory
|
|
|
44
48
|
(`~/.loongcode/`) — never inside
|
|
45
49
|
this package.
|
|
46
50
|
|
|
51
|
+
## Windows shell
|
|
52
|
+
|
|
53
|
+
On Windows, commands run in Windows PowerShell (`powershell.exe`) by default.
|
|
54
|
+
To run them in CMD instead, add `shell` to `settings.json`:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"shell": "cmd"
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- `"powershell"` (default) — `powershell.exe`, started with `-NoLogo
|
|
63
|
+
-NoProfile -NonInteractive`; `"cmd"` — `cmd.exe`, taken from `%ComSpec%`.
|
|
64
|
+
- Global (`~/.loongcode/settings.json`) with a per-project override
|
|
65
|
+
(`.loongcode/settings.json`); the project value applies, so an explicit
|
|
66
|
+
choice is never replaced by the default.
|
|
67
|
+
- Windows only: other platforms always run commands in `/bin/sh`.
|
|
68
|
+
- CMD and PowerShell are different languages — their syntax, built-ins and
|
|
69
|
+
scripts are not interchangeable, and neither has POSIX commands (`ls`, `cat`,
|
|
70
|
+
`grep`, …).
|
|
71
|
+
- Nothing switches shells automatically: if the selected shell is unavailable
|
|
72
|
+
the command fails with an error naming it, including when PowerShell is the
|
|
73
|
+
default. `pwsh` (PowerShell 7) is not selected for you.
|
|
74
|
+
- Choose `cmd` for CMD syntax, batch built-ins, or tooling that expects
|
|
75
|
+
`%ComSpec%`.
|
|
76
|
+
|
|
47
77
|
See the repository README for the full product documentation.
|