@datalabrotterdam/nova-ai-cli 1.1.0 → 1.2.0-alpha.10
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 +165 -0
- package/README.md +211 -100
- package/dist/browser-setup-7SWHUQEL.js +57 -0
- package/dist/chunk-FMHWW3E6.js +11 -0
- package/dist/chunk-KDAUUQBE.js +643 -0
- package/dist/chunk-L77KQRGZ.js +170 -0
- package/dist/headless-BQXK7TNC.js +550 -0
- package/dist/index.js +193 -17
- package/dist/tui-TJFV6NC6.js +5185 -0
- package/dist/update-check-G3PYCRWM.js +23 -0
- package/package.json +35 -33
- package/dist/acp/agent.d.ts +0 -13
- package/dist/acp/agent.js +0 -242
- package/dist/acp/auth-server.d.ts +0 -10
- package/dist/acp/auth-server.js +0 -67
- package/dist/acp/credentials.d.ts +0 -11
- package/dist/acp/credentials.js +0 -30
- package/dist/acp/index.d.ts +0 -2
- package/dist/acp/index.js +0 -21
- package/dist/acp/mcp.d.ts +0 -11
- package/dist/acp/mcp.js +0 -90
- package/dist/acp/sessions.d.ts +0 -20
- package/dist/acp/sessions.js +0 -91
- package/dist/acp/tools/index.d.ts +0 -6
- package/dist/acp/tools/index.js +0 -5
- package/dist/acp/tools/marker.d.ts +0 -17
- package/dist/acp/tools/marker.js +0 -43
- package/dist/acp/tools/permission.d.ts +0 -2
- package/dist/acp/tools/permission.js +0 -20
- package/dist/acp/tools/read-file.d.ts +0 -2
- package/dist/acp/tools/read-file.js +0 -20
- package/dist/acp/tools/registry.d.ts +0 -4
- package/dist/acp/tools/registry.js +0 -10
- package/dist/acp/tools/reporting.d.ts +0 -3
- package/dist/acp/tools/reporting.js +0 -26
- package/dist/acp/tools/run-command.d.ts +0 -2
- package/dist/acp/tools/run-command.js +0 -29
- package/dist/acp/tools/system-prompt.d.ts +0 -2
- package/dist/acp/tools/system-prompt.js +0 -23
- package/dist/acp/tools/types.d.ts +0 -18
- package/dist/acp/tools/types.js +0 -1
- package/dist/acp/tools/write-file.d.ts +0 -2
- package/dist/acp/tools/write-file.js +0 -20
- package/dist/index.d.ts +0 -2
- package/dist/tui/index.d.ts +0 -7
- package/dist/tui/index.js +0 -11
- package/dist/webui/index.d.ts +0 -6
- package/dist/webui/index.js +0 -9
- package/src/acp/web/dist/assets/index-CSccI7lJ.css +0 -1
- package/src/acp/web/dist/assets/index-D2Z0sfLR.js +0 -1
- package/src/acp/web/dist/favicon.svg +0 -46
- package/src/acp/web/dist/index.html +0 -32
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# [@datalabrotterdam/nova-ai-cli-v1.2.0-alpha.10](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/@datalabrotterdam/nova-ai-cli@1.2.0-alpha.9...@datalabrotterdam/nova-ai-cli@1.2.0-alpha.10) (2026-10-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **cli:** commit the vendored browser host build ([f54c98f](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/f54c98f2ef6319c243ab048842603490cab2e7ed))
|
|
7
|
+
* **cli:** update the vendored browser host ([0a9800a](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/0a9800a2e207c42873f0de18138d55f522a10624))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **agent:** bundled skills are read-only and can only be switched off ([16f480c](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/16f480cb9d8f0da03f718d0c102dfb6485e5f47d))
|
|
13
|
+
* **cli:** depend on @datalabrotterdam/nova-ai-browser-host ([6214053](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/62140534c2f40d1f33d4d20ca81edae604a5d550))
|
|
14
|
+
* **cli:** set up the Nova AI browser integration at start-up ([4c9c049](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/4c9c049ecf8a9019b8d5de3082f841d173e1610e))
|
|
15
|
+
|
|
16
|
+
# [@datalabrotterdam/nova-ai-cli-v1.2.0-alpha.9](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/@datalabrotterdam/nova-ai-cli@1.2.0-alpha.8...@datalabrotterdam/nova-ai-cli@1.2.0-alpha.9) (2026-10-24)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **agent:** autopilot mode, and autopilot in agent files ([c9d47ee](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/c9d47ee97f9f5e648592159678c24a71bdda4b5c))
|
|
22
|
+
|
|
23
|
+
# [@datalabrotterdam/nova-ai-cli-v1.2.0-alpha.8](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/@datalabrotterdam/nova-ai-cli@1.2.0-alpha.7...@datalabrotterdam/nova-ai-cli@1.2.0-alpha.8) (2026-10-24)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* slash commands from markdown files ([305f111](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/305f1112c6f8312ab8a0683954c4e5bc88d7b952))
|
|
29
|
+
|
|
30
|
+
# [@datalabrotterdam/nova-ai-cli-v1.2.0-alpha.7](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/@datalabrotterdam/nova-ai-cli@1.2.0-alpha.6...@datalabrotterdam/nova-ai-cli@1.2.0-alpha.7) (2026-10-24)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **agent:** Claude Code compatible hooks ([227fe8b](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/227fe8b273ec2e211e9d57674e76af5c42a473bd))
|
|
36
|
+
* **agent:** install the shared Nova skills ([64139dd](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/64139dd612933343f04f165de1a9ab78832d6864))
|
|
37
|
+
* **agent:** mark and protect bundled skills ([6ef52eb](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/6ef52eb6d048f8a3b4e75686244aabcfd0f62d6e))
|
|
38
|
+
* **agent:** thinking effort for reasoning models ([8551fea](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/8551feacff3e1675f369030e20fb2b5071f0db7f))
|
|
39
|
+
* **agent:** web_search tool ([12985eb](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/12985eb9ca06d6c814d4e0162465c651889d9370))
|
|
40
|
+
* **cli:** /effort slider for thinking models ([8ca67f2](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/8ca67f2f5dcc8f6bff8c36409a2baba5d43c4a02))
|
|
41
|
+
* **cli:** remember the thinking level ([883196c](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/883196c9fdb089f4f26ac82b557cc87dfc0b1c0b))
|
|
42
|
+
* OAuth sign-in for MCP servers ([ba57c79](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/ba57c79642f902ab2bc20f59e4627fb2b774bb4a))
|
|
43
|
+
* the user's agent files as session modes ([3386de8](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/3386de88d07b0351bd1e44960fcacfef26e3d45b))
|
|
44
|
+
|
|
45
|
+
# [@datalabrotterdam/nova-ai-cli-v1.2.0-alpha.6](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/@datalabrotterdam/nova-ai-cli@1.2.0-alpha.5...@datalabrotterdam/nova-ai-cli@1.2.0-alpha.6) (2026-10-23)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* **cli:** start the session before the first prompt ([0c26456](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/0c26456b8126e3b42a6de2e38212213ae5380e62))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Features
|
|
54
|
+
|
|
55
|
+
* **agent:** set workspace trust over ACP ([cec4a89](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/cec4a8949a4232f46448219e4d5363289651215d))
|
|
56
|
+
|
|
57
|
+
# [@datalabrotterdam/nova-ai-cli-v1.2.0-alpha.5](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/@datalabrotterdam/nova-ai-cli@1.2.0-alpha.4...@datalabrotterdam/nova-ai-cli@1.2.0-alpha.5) (2026-10-23)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Bug Fixes
|
|
61
|
+
|
|
62
|
+
* **cli:** keep the full-screen frame one row short of the terminal ([37355f4](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/37355f4efb8a237f204c061ad7008faf54a0dd9e))
|
|
63
|
+
* **cli:** pick the account's default model when none is set ([fb0f34c](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/fb0f34c7bac26f1b59c4b6b2245e6fb8365f99f1))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Features
|
|
67
|
+
|
|
68
|
+
* **cli:** full-screen TUI with a pinned prompt and mouse-wheel scrolling ([a68d693](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/a68d6930945bd6440de22c709fc14ae32a9c9f65))
|
|
69
|
+
|
|
70
|
+
# [@datalabrotterdam/nova-ai-cli-v1.2.0-alpha.4](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/@datalabrotterdam/nova-ai-cli@1.2.0-alpha.3...@datalabrotterdam/nova-ai-cli@1.2.0-alpha.4) (2026-10-05)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### Bug Fixes
|
|
74
|
+
|
|
75
|
+
* **cli:** depend on the agent version the CLI was released with ([4931439](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/4931439d106063b81e24367d6aa9c3f285f4ad15))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Features
|
|
79
|
+
|
|
80
|
+
* **cli:** offer npm updates at start-up, remind until installed, /update ([18defca](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/18defcaea988698f9d0909419bb2aa1fdedfa5a9))
|
|
81
|
+
|
|
82
|
+
# [@datalabrotterdam/nova-ai-cli-v1.2.0-alpha.3](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/@datalabrotterdam/nova-ai-cli@1.2.0-alpha.2...@datalabrotterdam/nova-ai-cli@1.2.0-alpha.3) (2026-10-04)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Bug Fixes
|
|
86
|
+
|
|
87
|
+
* **agent:** never overwrite an unreadable settings file when switching a skill ([ca989ef](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/ca989ef1810fc903cea069cdadf3041fe164e364))
|
|
88
|
+
* **cli:** install the command as nova-ai only ([eda8064](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/eda806411af1738ff6f6b1404d23d4e84a74ced8))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Features
|
|
92
|
+
|
|
93
|
+
* **agent,cli:** Nova skill folders, switching skills off, a budgeted skill list ([0891c79](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/0891c79248d3a645d638f12f46928a54652b0941))
|
|
94
|
+
* **cli:** update notice from npm for every channel, cached daily ([c3a0014](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/c3a001473336aac14d216cdeec0bedde4df34427))
|
|
95
|
+
|
|
96
|
+
# [@datalabrotterdam/nova-ai-cli-v1.2.0-alpha.2](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/@datalabrotterdam/nova-ai-cli@1.2.0-alpha.1...@datalabrotterdam/nova-ai-cli@1.2.0-alpha.2) (2026-10-03)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### Features
|
|
100
|
+
|
|
101
|
+
* release the agent separately as @datalabrotterdam/nova-ai-agent ([32ecfc0](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/32ecfc0faa99bd5bb80cb2eaf2363abc050978f0))
|
|
102
|
+
|
|
103
|
+
# [1.2.0-alpha.1](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/v1.1.0...v1.2.0-alpha.1) (2026-10-03)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
### Bug Fixes
|
|
107
|
+
|
|
108
|
+
* **acp:** bounded, cancellable client terminals in the workspace ([81f7099](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/81f70996d9dfc8d78e12282def1582ea859f2784))
|
|
109
|
+
* **acp:** isolate background prompt jobs from live session history ([8328a8b](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/8328a8bfa1f22871ef36ec38247987e6effcd044))
|
|
110
|
+
* **acp:** replay loaded sessions faithfully; page session/list ([d576171](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/d5761710890f7b2f5d1b340cdce7faafcd2e3561))
|
|
111
|
+
* **env:** no shells or Docker probes when a session starts ([dc3a449](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/dc3a4495f394c1a16e48e282efd76b765af09999))
|
|
112
|
+
* **mcp:** connect servers in parallel with timeouts and diagnostics ([db4c62c](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/db4c62cd9c8ec0f197ea1ae1ce76adcf9d397ed5))
|
|
113
|
+
* **models:** offer and default to chat models only ([5d3ade2](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/5d3ade2727110ca7555bfdfa5b174c9e75b151f9))
|
|
114
|
+
* **security:** harden sessions, setup auth, credentials, processes and file access ([7f02a1d](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/7f02a1d203128555c4d00e5ab4dc4786329b6225))
|
|
115
|
+
* **tui:** keep printed lines inside the terminal width ([dd5cd0a](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/dd5cd0a40592af392eca797399ce56c0e672110e))
|
|
116
|
+
* **tui:** redraw cleanly after the terminal width changes ([f0b2ec6](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/f0b2ec6d01b0bd8ebcf087330c8bfd82072aa08d))
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Features
|
|
120
|
+
|
|
121
|
+
* **acp:** agentInfo and env_var authentication in initialize ([b736e11](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/b736e115542b8fef083f9fc75514586327d3ac49))
|
|
122
|
+
* **acp:** namespace Nova extensions under _nova/ ([bf56cb9](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/bf56cb9e093dc90fc43b44008f1ddd86446a8cd0))
|
|
123
|
+
* **acp:** serialized turns, cancel, shutdown and proper error codes ([6688470](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/66884701af129ff2c1e9ad78b9e572d7ec64cc4b))
|
|
124
|
+
* **acp:** the agent owns permissions; clients only answer its questions ([7db651d](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/7db651d8d4883da2c170a831aeaa2952dc4444ac))
|
|
125
|
+
* **acp:** usage, session info, commands and model options as updates ([21d0816](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/21d08160c558ca9431deff8f8ead25e89a93d21c))
|
|
126
|
+
* added alpha stage on TUI ([3415411](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/3415411986ef4aefc2aa94dbb66fc73710fb6a5d))
|
|
127
|
+
* **cli:** proper entry point, -p/--print, login/logout, help and version ([73c8f94](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/73c8f9472099fa7c3cedccdd3c6a315d809e6a00))
|
|
128
|
+
* **core:** allow multiple tool calls per round ([f6a2171](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/f6a217145efac0722fddc49995808a7ad7bb2508))
|
|
129
|
+
* **core:** compact proactively at 80% of the model context window ([96afcbb](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/96afcbb7b68f4686a9b769bb80a73b00eebfe4a4))
|
|
130
|
+
* **core:** native tool calling with learned per-model text fallback ([6d71193](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/6d7119395b39a45026d676813ad3596382e2611a))
|
|
131
|
+
* **core:** share the ~/.nova-ai project layout with the VS Code extension ([aa75dde](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/aa75dde65218fdbd16b9f329bd849cc9ec608a28))
|
|
132
|
+
* **core:** validate tool args centrally before dispatch ([0a88e3e](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/0a88e3efb0d7c32611979e408b95e659873ec1e5))
|
|
133
|
+
* expand ACP runtime and terminal workflows ([bfbae15](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/bfbae157c301fbc1b7e88f5e267d25c8da126008))
|
|
134
|
+
* **mcp:** surface tool schemas, respect readOnlyHint, hint cwd args ([2b22be3](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/2b22be327b052788936e4badb010844f7ca3d057))
|
|
135
|
+
* **memory:** shared MEMORY.md index + typed notes, compatible with VS Code ([474c916](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/474c91694f4da58400426f39c290ac6888f4aa19))
|
|
136
|
+
* **modes:** plan mode can read, ask and keep the task list ([e253eaa](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/e253eaa66fd02478d61f34e734a27883068bf357))
|
|
137
|
+
* **policy:** agent-side permission policy with trust-gated rule sources ([234cd3a](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/234cd3adf06423c973c52497e5e31f6868d6b19a))
|
|
138
|
+
* **policy:** rule subjects for the extension's tool names ([5c188b6](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/5c188b610ff6e4ba8a715cc2ee10960736493b86))
|
|
139
|
+
* **tools:** add JSON schema validator for tool args ([24764ef](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/24764ef5100c14404f1923f89cc87c3d64de510d))
|
|
140
|
+
* **tools:** declare args schemas on every built-in tool ([79f6283](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/79f62833144f1a6aba9aaa65a2a19f18eb8793ca))
|
|
141
|
+
* **tools:** whitespace-tolerant edit_file with self-correction hints ([a350e14](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/a350e140e92c8469249d4c6297aad8f8161a217f))
|
|
142
|
+
* **tui:** Ink TUI with inline scrollback replaces pi-tui ([0725bae](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/0725bae27790829fd756afbdb5dd20574a1e0f00))
|
|
143
|
+
* **tui:** Shift+Enter inserts a new line where the terminal can report it ([b9c0b70](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/b9c0b7041057e2bdeb1675bbfa33a12fc3a664b9))
|
|
144
|
+
|
|
145
|
+
# [1.1.0](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/v1.0.1...v1.1.0) (2026-06-23)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
### Features
|
|
149
|
+
|
|
150
|
+
* **acp-web:** theme support, favicon, font, and dep bumps ([0576402](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/0576402b6888a2cf6bc93123d733c4163358c63f))
|
|
151
|
+
* **acp:** add MCP server support (stdio/http/sse) ([ba98b0c](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/ba98b0c0b2e2461e8553331cafa1985e7673ee43))
|
|
152
|
+
|
|
153
|
+
## [1.0.1](https://github.com/Datalab-Rotterdam/nova-ai-cli/compare/v1.0.0...v1.0.1) (2026-06-22)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Bug Fixes
|
|
157
|
+
|
|
158
|
+
* correct npm scope to [@datalabrotterdam](https://github.com/datalabrotterdam) ([6ab6bf8](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/6ab6bf88506cc1d4b778c1a30b123cd532a0a8de))
|
|
159
|
+
|
|
160
|
+
# 1.0.0 (2026-06-22)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Features
|
|
164
|
+
|
|
165
|
+
* add ACP agent, tool calling, and alpha release channel ([15d19a7](https://github.com/Datalab-Rotterdam/nova-ai-cli/commit/15d19a7998b4651ba9ad279fc2607006ea14ed49))
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
<img src="
|
|
3
|
+
<img src="https://raw.githubusercontent.com/Datalab-Rotterdam/nova-ai-cli/main/assets/logo.png" width="96" height="96" alt="Nova logo" />
|
|
4
4
|
|
|
5
5
|
# @datalabrotterdam/nova-ai-cli
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
**Agentic coding with DataLab Rotterdam's Nova AI: in your terminal, in scripts, and in your editor over the Agent Client Protocol**
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@datalabrotterdam/nova-ai-cli)
|
|
10
10
|
[](https://www.npmjs.com/package/@datalabrotterdam/nova-ai-cli)
|
|
@@ -12,136 +12,247 @@
|
|
|
12
12
|
[](https://agentclientprotocol.com)
|
|
13
13
|
[](https://github.com/Datalab-Rotterdam/nova-ai-cli/issues)
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
[npm](https://www.npmjs.com/package/@datalabrotterdam/nova-ai-cli) · [Issues](https://github.com/Datalab-Rotterdam/nova-ai-cli/issues) · [ACP docs](https://agentclientprotocol.com)
|
|
15
|
+
[npm](https://www.npmjs.com/package/@datalabrotterdam/nova-ai-cli) · [Issues](https://github.com/Datalab-Rotterdam/nova-ai-cli/issues) · [ACP reference](https://github.com/Datalab-Rotterdam/nova-ai-cli/blob/main/docs/ACP.md) · [Settings and memory](https://github.com/Datalab-Rotterdam/nova-ai-cli/blob/main/docs/NOVA_HOME.md)
|
|
18
16
|
|
|
19
17
|
</div>
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
`nova-ai` is a coding agent in the spirit of `claude` and `codex`, backed by
|
|
20
|
+
[Nova AI](https://platform.nova.datalabrotterdam.nl). It reads and edits your
|
|
21
|
+
code, runs commands with your permission, asks when a decision is yours, and
|
|
22
|
+
keeps a task list for longer work. One agent, three front ends:
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
- **Terminal UI**: `nova-ai`
|
|
25
|
+
- **Headless**: `nova-ai -p "…"` for scripts, CI and machines without a GUI
|
|
26
|
+
- **ACP agent**: `nova-ai --acp` for Zed, JetBrains, VS Code and any other
|
|
27
|
+
[Agent Client Protocol](https://agentclientprotocol.com) client
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
The terminal UI and headless mode talk to the agent over the same protocol an
|
|
30
|
+
editor uses, so all three behave the same: same tools, permissions, sessions,
|
|
31
|
+
memory, MCP servers and settings.
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
## Install
|
|
28
34
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
npx @datalabrotterdam/nova-ai-cli # interactive chat (WIP, stub)
|
|
32
|
-
npx @datalabrotterdam/nova-ai-cli --acp # speak ACP over stdio (editors/IDEs) — fully working
|
|
33
|
-
npx @datalabrotterdam/nova-ai-cli --web # standalone browser UI (WIP, stub)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Or install globally / as a project dependency:
|
|
35
|
+
Requires Node.js 22.19 or newer and a Nova AI API key
|
|
36
|
+
([get one](https://platform.nova.datalabrotterdam.nl/dashboard/api-keys)).
|
|
37
37
|
|
|
38
38
|
```sh
|
|
39
39
|
npm install -g @datalabrotterdam/nova-ai-cli
|
|
40
|
+
nova-ai login # opens a local page to enter the key; --no-browser asks in the terminal
|
|
41
|
+
nova-ai # start the terminal UI in your project
|
|
40
42
|
```
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
Or without installing: `npx @datalabrotterdam/nova-ai-cli login`, then
|
|
45
|
+
`npx @datalabrotterdam/nova-ai-cli`.
|
|
43
46
|
|
|
44
|
-
|
|
47
|
+
When a newer version is on npm, `nova-ai` asks before the terminal UI opens:
|
|
48
|
+
Enter installs it (`npm install -g`) and restarts, `n` asks again tomorrow, `s`
|
|
49
|
+
skips that version. Until it is installed, the status line keeps reminding you,
|
|
50
|
+
and `/update` installs it and restarts in the same session. `-p` and
|
|
51
|
+
`--version` print a notice (on stderr, only in a terminal). npm is asked at
|
|
52
|
+
most once a day; an alpha install also follows the `alpha` channel.
|
|
53
|
+
`NOVA_NO_UPDATE_CHECK=1` turns it off (it is off in CI).
|
|
45
54
|
|
|
46
|
-
|
|
55
|
+
nova-ai installs updates itself only when it was installed with
|
|
56
|
+
`npm install -g`; with npx, another package manager or a project dependency it
|
|
57
|
+
shows the command to run instead.
|
|
47
58
|
|
|
48
|
-
|
|
59
|
+
```
|
|
60
|
+
nova-ai [options] Interactive terminal UI
|
|
61
|
+
nova-ai -p [options] [prompt] Run one request headless (see nova-ai -p --help)
|
|
62
|
+
nova-ai --acp Agent Client Protocol over stdio (for editors)
|
|
63
|
+
nova-ai login [--no-browser] Connect your Nova AI account
|
|
64
|
+
nova-ai logout Remove the stored API key
|
|
65
|
+
|
|
66
|
+
Interactive options:
|
|
67
|
+
--resume <session-id> Continue a saved session
|
|
68
|
+
-c, --continue Continue the most recent session in this folder
|
|
69
|
+
--model <id> Use this model
|
|
70
|
+
```
|
|
49
71
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
72
|
+
## Terminal UI
|
|
73
|
+
|
|
74
|
+
The UI runs full screen (the terminal's alternate screen, like `less` or
|
|
75
|
+
`vim`) and gives your shell its screen back on exit. The mouse wheel or
|
|
76
|
+
PgUp/PgDn scroll the transcript, Esc jumps back to the newest output, and
|
|
77
|
+
while you read an answer the prompt that asked for it stays pinned on the top
|
|
78
|
+
row. To select text, hold Shift (Option in some macOS terminals) while dragging.
|
|
79
|
+
|
|
80
|
+
- **Modes** (Shift+Tab): `agent` does the work; `plan` reads the code, asks
|
|
81
|
+
questions and builds a task list but changes nothing; `ask` only answers;
|
|
82
|
+
`autopilot` works on until the task is done, picking defaults instead of
|
|
83
|
+
asking (approvals still ask you).
|
|
84
|
+
Your own agents (`~/.nova-ai/agents/<name>.agent.md`, the format the VS Code
|
|
85
|
+
extension uses) are extra modes after these; `/mode` lists them.
|
|
86
|
+
- **Permissions**: before an edit or command you choose once, for this
|
|
87
|
+
session, always (saved as an exact rule) or deny. Ctrl+K switches between
|
|
88
|
+
asking, accepting edits, and bypass (never remembered).
|
|
89
|
+
- **Questions and tasks**: the agent can ask 1–4 multiple-choice questions
|
|
90
|
+
(with descriptions, a recommended option and your own answer) and shows a
|
|
91
|
+
live checklist for multi-step work.
|
|
92
|
+
- **Prompt**: history, `@file` mentions, `/command` completion, large pastes
|
|
93
|
+
as compact markers, Alt+V to paste an image (for models that accept
|
|
94
|
+
images). Messages typed while Nova works are queued; ↑ edits them.
|
|
95
|
+
`/steer <text>` reaches the running turn at the next tool boundary.
|
|
96
|
+
|
|
97
|
+
| Key | Action |
|
|
98
|
+
|---|---|
|
|
99
|
+
| Enter / Shift+Enter | Send / new line (Shift+Enter where the terminal supports the kitty keyboard protocol: VS Code, kitty, WezTerm, Ghostty, foot, Alacritty, recent iTerm2; Alt+Enter, Ctrl+J or a trailing `\` work everywhere) |
|
|
100
|
+
| Esc | Cancel the running turn |
|
|
101
|
+
| Ctrl+C twice | Exit; prints `nova-ai --resume <id>` |
|
|
102
|
+
| Shift+Tab | Cycle agent / ask / plan / autopilot and your own agents |
|
|
103
|
+
| Ctrl+R / Ctrl+P / Ctrl+K | Sessions / models / permission mode |
|
|
104
|
+
| Ctrl+O / Ctrl+T / Ctrl+B | Verbose tool output / tool inspector / background jobs |
|
|
105
|
+
| Alt+V | Paste a clipboard image |
|
|
106
|
+
|
|
107
|
+
Slash commands: `/help`, `/model`, `/effort` (thinking models), `/mode`, `/permission`, `/session`,
|
|
108
|
+
`/resume`, `/clear`, `/compact`, `/rewind [n]`, `/queue`, `/steer`, `/usage`,
|
|
109
|
+
`/tools`, `/mcp`, `/skills`, `/shell` and `/agent` (background jobs), `/trust`
|
|
110
|
+
and `/exit`. Your own commands are markdown files in `~/.nova-ai/commands/` or
|
|
111
|
+
the repository's `.nova-ai/commands/` (Claude Code's format, so
|
|
112
|
+
`.claude/commands` works too): the file is the prompt, `$ARGUMENTS` what you
|
|
113
|
+
type after the command, and they show up in the `/` menu. Details:
|
|
114
|
+
[`src/tui/README.md`](https://github.com/Datalab-Rotterdam/nova-ai-cli/blob/main/packages/cli/src/tui/README.md).
|
|
115
|
+
|
|
116
|
+
## Headless
|
|
53
117
|
|
|
54
|
-
|
|
55
|
-
|
|
118
|
+
```sh
|
|
119
|
+
nova-ai -p "review the changed files"
|
|
120
|
+
git diff | nova-ai -p --output-format json "summarize this diff"
|
|
121
|
+
nova-ai -p --json --permission-mode accept-edits "fix the failing test"
|
|
122
|
+
nova-ai -p -c "and now add a changelog entry"
|
|
56
123
|
```
|
|
57
124
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
125
|
+
| Option | |
|
|
126
|
+
|---|---|
|
|
127
|
+
| `--output-format text\|json\|stream-json` | `text` prints the answer; `json` one object at the end (text, tools, permissions); `stream-json` (or `--json`) JSON Lines while it runs: `session.started`, `message.delta`, `tool.started`/`tool.updated`/`tool.finished`, `permission`, `queue.changed`, `background.update`, `result`, `error` |
|
|
128
|
+
| `--permission-mode` | `read-only` (default): anything that needs approval is refused, since nobody can approve it. `accept-edits`: file edits are accepted, commands still refused. `bypass-all`: everything is accepted. Deny rules always win. |
|
|
129
|
+
| `--resume <id>`, `-c` | Continue a session |
|
|
130
|
+
| `--model`, `--cwd` | Model and workspace |
|
|
131
|
+
| `--trust-workspace` | Trust the workspace (remembered): start the MCP servers and apply the allow rules it declares |
|
|
132
|
+
| `--no-mcp` | Ignore workspace MCP configuration |
|
|
61
133
|
|
|
62
|
-
|
|
134
|
+
Exit codes: `0` success, `1` configuration or runtime error, `2` cancelled,
|
|
135
|
+
`3` tool-turn safety limit, `130` interrupted.
|
|
63
136
|
|
|
64
|
-
##
|
|
137
|
+
## Editors (ACP)
|
|
65
138
|
|
|
66
|
-
|
|
139
|
+
Configure `nova-ai --acp` as a custom agent. For Zed:
|
|
67
140
|
|
|
68
141
|
```json
|
|
69
142
|
{
|
|
70
|
-
"
|
|
71
|
-
|
|
143
|
+
"agent_servers": {
|
|
144
|
+
"Nova AI": { "command": "npx", "args": ["-y", "@datalabrotterdam/nova-ai-cli", "--acp"] }
|
|
145
|
+
}
|
|
72
146
|
}
|
|
73
147
|
```
|
|
74
148
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
149
|
+
The agent supports session load/list/resume/fork/close/delete, modes, a
|
|
150
|
+
permission-mode and model selector, permission requests with once / session /
|
|
151
|
+
always options, client file system and terminals, form questions, plans, usage
|
|
152
|
+
and title updates, MCP servers (stdio, HTTP, SSE), image prompts, and three
|
|
153
|
+
login methods (browser, `NOVA_API_KEY`, or `nova-ai login` in a terminal).
|
|
154
|
+
Nova-specific features (prompt queue, rewind, compaction, context usage,
|
|
155
|
+
per-session settings, background jobs) are `_nova/…` extension methods. The agent is also published
|
|
156
|
+
on its own as
|
|
157
|
+
[`@datalabrotterdam/nova-ai-agent`](https://www.npmjs.com/package/@datalabrotterdam/nova-ai-agent)
|
|
158
|
+
(command `nova-ai-agent`), without the terminal UI, for integrations that only
|
|
159
|
+
need ACP. Everything is documented in
|
|
160
|
+
[docs/ACP.md](https://github.com/Datalab-Rotterdam/nova-ai-cli/blob/main/docs/ACP.md).
|
|
161
|
+
|
|
162
|
+
## Security model
|
|
163
|
+
|
|
164
|
+
- **The agent enforces permissions**, not the client. Every front end and
|
|
165
|
+
every editor gets the same policy; a client can only answer the questions
|
|
166
|
+
it is asked. Anything other than an explicit "allow" counts as "deny".
|
|
167
|
+
- **Deny rules win**, also in bypass mode and for read-only tools.
|
|
168
|
+
- **A repository can't approve itself.** Allow rules in a workspace's
|
|
169
|
+
`.nova-ai/settings*.json`, and MCP servers it declares (`.mcp.json`), only
|
|
170
|
+
take effect after you trust that workspace (asked once at startup, `/trust`,
|
|
171
|
+
or `--trust-workspace`). The trust decision is stored in `~/.nova-ai`, never
|
|
172
|
+
in the repository. A repository can't set the permission mode either.
|
|
173
|
+
- **"Always allow" saves an exact rule** for that command or path in your
|
|
174
|
+
private `~/.nova-ai/projects/<key>/settings.json`, outside the repository.
|
|
175
|
+
Compound commands (`a && b`, pipes) are checked part by part; substitutions
|
|
176
|
+
and nested shells need an exact rule.
|
|
177
|
+
- **Web pages are fetched only with approval.** `fetch_url` asks every time
|
|
178
|
+
unless a rule allows that URL (a URL can carry data out), and a redirect to
|
|
179
|
+
another site needs its own approval. `web_search` asks the same way, since
|
|
180
|
+
the query goes to the search providers (You.com, DuckDuckGo; your own
|
|
181
|
+
SearXNG server first when `~/.nova-ai/settings.json` has
|
|
182
|
+
`"webSearch": { "searxngUrl": "https://…" }`).
|
|
183
|
+
- **File access stays in the workspace** (symlinks resolved); commands run in
|
|
184
|
+
their own process group with a timeout, and the whole tree is stopped on
|
|
185
|
+
cancel.
|
|
186
|
+
- **Credentials** are stored in `~/.nova-ai/credentials.json` with mode 0600.
|
|
187
|
+
The browser login page only accepts a one-time token from the same origin.
|
|
188
|
+
|
|
189
|
+
## Settings, memory and sessions
|
|
190
|
+
|
|
191
|
+
Everything lives in `~/.nova-ai` (or `$NOVA_AI_HOME`), shared with the Nova
|
|
192
|
+
VS Code extension: settings, per-project trust, sessions and memory.
|
|
193
|
+
|
|
194
|
+
- **Rules**: `{"permissions": {"allow": ["run_command(npm test)", "edit_file(src/*)"], "deny": ["read_file(.env)"]}}`
|
|
195
|
+
in `~/.nova-ai/settings.json`, the private project file, or the workspace's
|
|
196
|
+
`.nova-ai/settings.json` (team, committed) and `.nova-ai/settings.local.json`
|
|
197
|
+
(personal). Claude-style aliases such as `Bash(npm run *)` and `Edit(src/**)`
|
|
198
|
+
work too.
|
|
199
|
+
- **Instructions**: `NOVA.md` and `AGENTS.md` in the workspace.
|
|
200
|
+
- **Memory**: a `MEMORY.md` index plus notes, globally and per project,
|
|
201
|
+
through the `memory_read` and `memory_write` tools (writes need approval).
|
|
202
|
+
- **Skills**: `SKILL.md` files under `.nova-ai/skills` in the workspace or
|
|
203
|
+
`~/.nova-ai/skills` for every project (`.agents`, `.claude` and `.codex`
|
|
204
|
+
skills folders are read too). `/skills` lists them; `/skills off <name>`
|
|
205
|
+
switches one off in this project (`--global`: everywhere). Only names and
|
|
206
|
+
short descriptions go into the prompt; Nova loads a skill when it fits.
|
|
207
|
+
Nova installs its own skills for Word, Excel, PowerPoint and PDF files
|
|
208
|
+
(`nova-docx`, `nova-xlsx`, `nova-pptx`, `nova-pdf`, from
|
|
209
|
+
[nova-ai-skills](https://github.com/Datalab-Rotterdam/nova-ai-skills)) in
|
|
210
|
+
`~/.nova-ai/skills` and keeps them up to date; they need Python 3.
|
|
211
|
+
- **Hooks**: Claude Code's `hooks` format in the same settings files (a
|
|
212
|
+
repository's own only once you trust the workspace): `PreToolUse`,
|
|
213
|
+
`PostToolUse`, `UserPromptSubmit`, `SessionStart` and `Stop`, with Claude
|
|
214
|
+
Code's tool names as matchers, so hooks from `.claude/settings.json` work
|
|
215
|
+
when copied over.
|
|
216
|
+
- **MCP servers**: `.mcp.json` or `mcpServers` in `.nova-ai/settings.json`.
|
|
217
|
+
HTTP servers that use OAuth show "needs sign-in" in `/mcp`; `/mcp login
|
|
218
|
+
<server>` opens the sign-in page in your browser (tokens are kept in
|
|
219
|
+
`~/.nova-ai/mcp-auth`, refreshed automatically), `/mcp logout <server>`
|
|
220
|
+
forgets them. A server that wants a client registered by hand takes
|
|
221
|
+
`"oauth": { "clientId", "clientSecret", "scope", "callbackPort" }` in
|
|
222
|
+
`.mcp.json`.
|
|
223
|
+
|
|
224
|
+
The complete layout and rule syntax: [docs/NOVA_HOME.md](https://github.com/Datalab-Rotterdam/nova-ai-cli/blob/main/docs/NOVA_HOME.md).
|
|
225
|
+
|
|
226
|
+
## Models
|
|
227
|
+
|
|
228
|
+
The model list shows the chat models of your account. On login Nova picks the
|
|
229
|
+
first one with native tool calling; `/model` or Ctrl+P changes it (and
|
|
230
|
+
remembers the choice), `--model` or `NOVA_MODEL` sets it for one run. Nova uses the gateway's function calling and falls back
|
|
231
|
+
to a text protocol for models that don't support it. When the context window
|
|
232
|
+
fills up, older messages are summarized automatically (`/compact` does it by
|
|
233
|
+
hand).
|
|
234
|
+
|
|
235
|
+
Thinking models are marked ◆ in the model list. For those with levels the
|
|
236
|
+
status line shows the current one (`· thinking medium`) and `/effort` opens a
|
|
237
|
+
slider (←/→, Enter), or sets one directly (`/effort high`, `/effort off`). The
|
|
238
|
+
choice is remembered like the model; a model without that level uses its own
|
|
239
|
+
default.
|
|
240
|
+
|
|
241
|
+
| Environment | |
|
|
89
242
|
|---|---|
|
|
90
|
-
| `NOVA_API_KEY` |
|
|
91
|
-
| `
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
## What it implements
|
|
98
|
-
|
|
99
|
-
| ACP method | Behavior |
|
|
100
|
-
|---|---|
|
|
101
|
-
| `initialize` | Returns protocol version + the `nova-api-key` agent auth method |
|
|
102
|
-
| `session/new` | Allocates a session id with in-memory history |
|
|
103
|
-
| `session/load` | Restores a previously-persisted session and replays its turns as `*_message_chunk` notifications |
|
|
104
|
-
| `session/list` | Lists stored sessions, optionally filtered by `cwd` |
|
|
105
|
-
| `authenticate` | Runs the local browser auth flow (`src/acp/auth-server.ts`) and resolves once a valid key is stored |
|
|
106
|
-
| `session/prompt` | Streams a `chat.completions.stream()` call, forwarding `agent_message_chunk` updates as text arrives; drives the tool-calling loop below |
|
|
107
|
-
| `session/cancel` | Aborts the in-flight Nova AI request via `AbortController` |
|
|
108
|
-
|
|
109
|
-
Only `text` and `resource_link` content blocks are read from prompts today — images/audio/embeddings supported by `nova-sdk` aren't wired up yet.
|
|
110
|
-
|
|
111
|
-
Sessions are persisted to disk (`src/acp/sessions.ts`) so `session/load` can rehydrate history, and a title is auto-derived from the conversation.
|
|
112
|
-
|
|
113
|
-
### Tool calling
|
|
114
|
-
|
|
115
|
-
While streaming a response, the agent watches for a fenced tool-call marker in the model's output (`src/acp/tools/marker.ts`). When one appears, it stops streaming text and instead:
|
|
116
|
-
|
|
117
|
-
1. Reports the pending call via `session/update` (`tool_call` with status `pending`).
|
|
118
|
-
2. Requests permission from the client for any **mutating** tool (`allow_once` / `reject_once`), via `session/request_permission`.
|
|
119
|
-
3. Executes the tool and reports the result/error via a `tool_call_update`.
|
|
120
|
-
4. Feeds the tool result back into the conversation and loops (up to 10 rounds per prompt) until the model produces a plain answer.
|
|
121
|
-
|
|
122
|
-
Built-in tools (`src/acp/tools/registry.ts`):
|
|
123
|
-
|
|
124
|
-
| Tool | Mutating | Behavior |
|
|
125
|
-
|---|---|---|
|
|
126
|
-
| `read_file` | No | Reads a file's contents, gated by client `fs.readTextFile` capability |
|
|
127
|
-
| `write_file` | Yes | Writes/overwrites a file, gated by client `fs.writeTextFile` capability — requires permission |
|
|
128
|
-
| `run_command` | Yes | Runs a shell command in the session's `cwd` — requires permission |
|
|
129
|
-
|
|
130
|
-
Tools are filtered per-session by the client's advertised `clientCapabilities`, so a client without filesystem support never sees `read_file`/`write_file` offered.
|
|
131
|
-
|
|
132
|
-
---
|
|
243
|
+
| `NOVA_API_KEY`, `NOVA_MODEL` | Use this key / model instead of the stored ones |
|
|
244
|
+
| `NOVA_BASE_URL` | Another Nova (OpenAI-compatible) gateway |
|
|
245
|
+
| `NOVA_AI_HOME` | Settings folder (default `~/.nova-ai`) |
|
|
246
|
+
| `NOVA_TOOL_PROTOCOL` | Force `native` or `text` tool calling |
|
|
247
|
+
| `NOVA_NES_MODEL` | Separate model for next-edit suggestions (ACP) |
|
|
248
|
+
| `NOVA_KITTY_KEYBOARD` | `1`/`0`: force the kitty keyboard protocol on or off |
|
|
249
|
+
| `NOVA_NO_UPDATE_CHECK` | Don't ask npm for a newer version (also `NO_UPDATE_NOTIFIER`, or `CI`) |
|
|
133
250
|
|
|
134
251
|
## Development
|
|
135
252
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
npm run build # builds the Svelte setup page, then tsc -> dist/
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Releases are automated via `semantic-release` on push to `main` (see `.github/workflows/ci.yml`); commit messages drive version bumps.
|
|
143
|
-
|
|
144
|
-
---
|
|
253
|
+
This package lives in the [nova-ai-cli repository](https://github.com/Datalab-Rotterdam/nova-ai-cli)
|
|
254
|
+
next to the agent package it depends on; see the repository README for
|
|
255
|
+
building and testing.
|
|
145
256
|
|
|
146
257
|
## License
|
|
147
258
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// src/browser-setup.ts
|
|
2
|
+
import { execFile, spawn } from "child_process";
|
|
3
|
+
import { existsSync } from "fs";
|
|
4
|
+
import { createRequire } from "module";
|
|
5
|
+
import { dirname, join } from "path";
|
|
6
|
+
var runInstaller = (node, args) => new Promise((resolve, reject) => {
|
|
7
|
+
execFile(node, args, { encoding: "utf8", timeout: 6e4, maxBuffer: 1024 * 1024 }, (error, stdout, stderr) => {
|
|
8
|
+
if (error) reject(new Error(`${error.message}${stderr ? `
|
|
9
|
+
${stderr}` : ""}`));
|
|
10
|
+
else resolve(stdout);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
function browserSetupDisabled(env = process.env) {
|
|
14
|
+
return env.NOVA_AI_BROWSER_AUTO_SETUP === "0" || Boolean(env.CI);
|
|
15
|
+
}
|
|
16
|
+
function bundledInstaller(from = import.meta.url) {
|
|
17
|
+
try {
|
|
18
|
+
const manifest = createRequire(from).resolve("@datalabrotterdam/nova-ai-browser-host/package.json");
|
|
19
|
+
const installer = join(dirname(manifest), "dist", "cli.js");
|
|
20
|
+
return existsSync(installer) ? installer : void 0;
|
|
21
|
+
} catch {
|
|
22
|
+
return void 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function parseSetupOutput(output) {
|
|
26
|
+
const line = output.trim().split("\n").reverse().find((entry) => entry.trim().startsWith("{"));
|
|
27
|
+
if (!line) throw new Error("The browser host installer printed no result.");
|
|
28
|
+
return JSON.parse(line);
|
|
29
|
+
}
|
|
30
|
+
var INSTALLER_ARGS = ["install", "--auto", "--json"];
|
|
31
|
+
async function setUpBrowser(run = runInstaller, installer = bundledInstaller()) {
|
|
32
|
+
if (!installer) throw new Error("The bundled Nova AI Browser host is missing from this installation.");
|
|
33
|
+
return parseSetupOutput(await run(process.execPath, [installer, ...INSTALLER_ARGS]));
|
|
34
|
+
}
|
|
35
|
+
function setUpBrowserInBackground(installer = bundledInstaller()) {
|
|
36
|
+
if (browserSetupDisabled() || !installer) return;
|
|
37
|
+
try {
|
|
38
|
+
spawn(process.execPath, [installer, ...INSTALLER_ARGS], { detached: true, stdio: "ignore" }).unref();
|
|
39
|
+
} catch {
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function describeBrowserSetup(result) {
|
|
43
|
+
if (!result.browsers.length) {
|
|
44
|
+
return "Browser: no Chromium-based browser (Chrome, Edge, Brave, \u2026) found for this user.";
|
|
45
|
+
}
|
|
46
|
+
const restart = result.newBrowsers.length ? ` Restart ${result.newBrowsers.join(", ")} once so it picks this up.` : "";
|
|
47
|
+
return `Browser: Nova can use ${result.browsers.join(", ")} through the Nova AI browser extension.${restart}`;
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
INSTALLER_ARGS,
|
|
51
|
+
browserSetupDisabled,
|
|
52
|
+
bundledInstaller,
|
|
53
|
+
describeBrowserSetup,
|
|
54
|
+
parseSetupOutput,
|
|
55
|
+
setUpBrowser,
|
|
56
|
+
setUpBrowserInBackground
|
|
57
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/version.ts
|
|
2
|
+
import { readPackageVersion } from "@datalabrotterdam/nova-ai-agent/core/version.js";
|
|
3
|
+
var CLI_PACKAGE_NAME = "@datalabrotterdam/nova-ai-cli";
|
|
4
|
+
function cliVersion() {
|
|
5
|
+
return readPackageVersion(CLI_PACKAGE_NAME, import.meta.url);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
CLI_PACKAGE_NAME,
|
|
10
|
+
cliVersion
|
|
11
|
+
};
|