@lardexx/arenacode 2.5.4 → 2.5.5
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/README.md +3 -1
- package/docs/PUBLISHING.md +9 -1
- package/package.json +1 -1
- package/src/cli.js +29 -9
package/README.md
CHANGED
|
@@ -40,7 +40,9 @@ rebuilt from opencode 1.19.5's own source (`packages/tui/src/component/prompt`,
|
|
|
40
40
|
`logo.tsx`, `theme/assets/*.json`) and checked against frames captured from the installed binary in a pty.
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
arenacode # opens the TUI
|
|
43
|
+
arenacode # opens the TUI on a terminal; on the very first run it asks for URL + key first
|
|
44
|
+
arenacode ui # same thing, explicitly
|
|
45
|
+
arenacode chat # the plain line-by-line client, if you really want one
|
|
44
46
|
```
|
|
45
47
|
|
|
46
48
|
Home screen — two-tone block wordmark, centred prompt, tips, folder and version in the footer:
|
package/docs/PUBLISHING.md
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
# Publishing
|
|
2
2
|
|
|
3
|
-
**Live:** [`@lardexx/arenacode@2.5.
|
|
3
|
+
**Live:** [`@lardexx/arenacode@2.5.5`](https://www.npmjs.com/package/@lardexx/arenacode) — 34 files, 226 kB tarball,
|
|
4
4
|
no runtime dependencies. The command stays `arenacode`.
|
|
5
5
|
|
|
6
|
+
2.5.5 fixes `main()` defaulting the subcommand to `chat`, which sent every bare `arenacode` to the line CLI and
|
|
7
|
+
made the TUI unreachable without typing `ui`; a bare invocation now opens the interface, and on first run the
|
|
8
|
+
interface asks for URL + key instead of printing a dead-end notice.
|
|
9
|
+
|
|
10
|
+
2.5.4 made the hints launch-aware: run through npx and every message prints the command you can actually paste
|
|
11
|
+
(`npx @lardexx/arenacode init`), plus the one-line way to get the bare `arenacode` command.
|
|
12
|
+
|
|
6
13
|
```bash
|
|
7
14
|
npm install -g @lardexx/arenacode # then: arenacode
|
|
8
15
|
npx @lardexx/arenacode # or one-shot
|
|
@@ -30,6 +37,7 @@ npm itself suggests the escape hatch in that error: publish under a scope. Hence
|
|
|
30
37
|
| re-publish the same version | ❌ `409 Cannot publish over previously staged version "2.5.2"` |
|
|
31
38
|
| `npm stage list` / `stage approve` | ❌ "No staged versions" / `stage-id must be a valid UUID` — nothing to approve from the CLI |
|
|
32
39
|
| **bump to 2.5.3 and publish** | ✅ `+ @lardexx/arenacode@2.5.3`, `dist-tags.latest = 2.5.3` after ~2 min of async processing |
|
|
40
|
+
| 2.5.4 (npx-aware hints) | ✅ same path, again ~1–2 min of async processing before it appeared |
|
|
33
41
|
|
|
34
42
|
Two lessons for next time:
|
|
35
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lardexx/arenacode",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"description": "Terminal client for ArenaCode: talks to an arena-bridge, streams the Agent Mode timeline, and runs local commands and file operations on your PC. Node port of the ArenaCode desktop client.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
package/src/cli.js
CHANGED
|
@@ -137,7 +137,7 @@ async function ensureAuth(ctx) {
|
|
|
137
137
|
// commands
|
|
138
138
|
// --------------------------------------------------------------------------- //
|
|
139
139
|
|
|
140
|
-
async function cmdInit(flags) {
|
|
140
|
+
async function cmdInit(flags, { tail = true } = {}) {
|
|
141
141
|
banner(VERSION);
|
|
142
142
|
const cfg = readConfig();
|
|
143
143
|
write(c.gray(` config file: ${configPath()}`));
|
|
@@ -160,8 +160,10 @@ async function cmdInit(flags) {
|
|
|
160
160
|
const auth = await bridge.authCheck();
|
|
161
161
|
if (auth.status === 200) write(` ${c.green('✓')} API key accepted`);
|
|
162
162
|
else write(c.red(` ✗ API key rejected: ${(auth.json && auth.json.error) || auth.status}`));
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
if (tail) {
|
|
164
|
+
write('');
|
|
165
|
+
write(` ${c.gray('try:')} arenacode ask "list the files in my folder"`);
|
|
166
|
+
}
|
|
165
167
|
return 0;
|
|
166
168
|
}
|
|
167
169
|
|
|
@@ -353,13 +355,25 @@ async function cmdAsk(positional, flags) {
|
|
|
353
355
|
|
|
354
356
|
/** Full-screen TUI (opencode-style): timeline, input box, dialogs, local cards. */
|
|
355
357
|
async function cmdUi(flags) {
|
|
356
|
-
|
|
357
|
-
if (!requireUrl(ctx)) return 1;
|
|
358
|
+
let ctx = context(flags);
|
|
358
359
|
if (!process.stdout.isTTY || !process.stdin.isTTY) {
|
|
360
|
+
if (!requireUrl(ctx)) return 1;
|
|
359
361
|
write(c.red(' the TUI needs an interactive terminal.'));
|
|
360
362
|
write(c.gray(' inside a script or a pipe use: arenacode ask "…" or arenacode chat'));
|
|
361
363
|
return 1;
|
|
362
364
|
}
|
|
365
|
+
|
|
366
|
+
// First run: `arenacode` (or `arenacode ui`) opens the setup here instead of printing two lines
|
|
367
|
+
// and quitting — the interface is what the user came for, the questions are just the way in.
|
|
368
|
+
if (!ctx.url) {
|
|
369
|
+
write('');
|
|
370
|
+
write(` ${c.bold('first run')} ${c.gray('· bridge URL and API key (Enter keeps the value in brackets)')}`);
|
|
371
|
+
write('');
|
|
372
|
+
await cmdInit(flags, { tail: false });
|
|
373
|
+
write('');
|
|
374
|
+
ctx = context(flags);
|
|
375
|
+
if (!ctx.url) return 1; // setup was abandoned: nothing to open
|
|
376
|
+
}
|
|
363
377
|
const { App } = require('./tui/app');
|
|
364
378
|
const app = new App({
|
|
365
379
|
url: ctx.url,
|
|
@@ -683,7 +697,10 @@ function help() {
|
|
|
683
697
|
|
|
684
698
|
async function main(argv) {
|
|
685
699
|
const { flags, positional } = parseArgs(argv);
|
|
686
|
-
|
|
700
|
+
// No default here: a bare `arenacode` must be distinguishable from `arenacode chat`, because only
|
|
701
|
+
// the bare form opens the TUI. Defaulting to 'chat' sent every plain invocation to the line CLI.
|
|
702
|
+
const [first = undefined, ...rest] = positional;
|
|
703
|
+
const command = first;
|
|
687
704
|
|
|
688
705
|
if (flags.version || command === 'version') {
|
|
689
706
|
write(VERSION);
|
|
@@ -724,13 +741,16 @@ async function main(argv) {
|
|
|
724
741
|
case 'handshake':
|
|
725
742
|
return cmdHandshake(flags);
|
|
726
743
|
default:
|
|
744
|
+
if (command === undefined) {
|
|
745
|
+
// bare invocation: the interface, when there is a terminal to draw it on
|
|
746
|
+
if (process.stdout.isTTY && process.stdin.isTTY) return cmdUi(flags);
|
|
747
|
+
help();
|
|
748
|
+
return 0;
|
|
749
|
+
}
|
|
727
750
|
if (command.startsWith('-')) {
|
|
728
751
|
// `arenacode "instruction"` convenience form
|
|
729
752
|
return cmdAsk(positional, flags);
|
|
730
753
|
}
|
|
731
|
-
if ((command === 'chat' || command === undefined) && process.stdout.isTTY && process.stdin.isTTY) {
|
|
732
|
-
return cmdUi(flags);
|
|
733
|
-
}
|
|
734
754
|
write(c.red(` unknown command: ${command}`));
|
|
735
755
|
help();
|
|
736
756
|
return 2;
|