nolo-cli 0.1.43 → 0.1.45
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/LICENSE +21 -0
- package/README.md +118 -263
- package/agentAliases.ts +4 -74
- package/agentMachineCommands.ts +33 -10
- package/agentNameResolver.ts +164 -0
- package/agentRecordCommands.ts +1 -3
- package/agentRecordHelpers.ts +23 -2
- package/agentRunCommand.ts +26 -14
- package/app/utils/myContentItems.ts +28 -0
- package/cli/agentAliases.ts +4 -74
- package/cli/agentMachineCommands.ts +33 -10
- package/cli/agentNameResolver.ts +164 -0
- package/cli/agentRecordCommands.ts +1 -3
- package/cli/agentRecordHelpers.ts +23 -2
- package/cli/agentRunCommand.ts +26 -14
- package/cli/client/agentRun.ts +1 -61
- package/cli/client/localRuntimeAdapter.ts +2 -8
- package/cli/commandRegistry.ts +3 -3
- package/cli/machineCommands.ts +6 -1
- package/cli/offlineMarxistsAgentCommand.ts +4 -5
- package/client/agentRun.test.ts +13 -11
- package/client/agentRun.ts +1 -61
- package/client/localRuntimeAdapter.test.ts +23 -18
- package/client/localRuntimeAdapter.ts +2 -8
- package/client/localRuntimeDryRun.test.ts +2 -0
- package/commandRegistry.ts +3 -3
- package/machineCommands.ts +6 -1
- package/offlineMarxistsAgentCommand.ts +4 -5
- package/package.json +28 -22
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bin Zhang
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,290 +1,145 @@
|
|
|
1
|
-
#
|
|
1
|
+
# nolo-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Local-first agent automation for open-source maintainers.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/nolo-cli)
|
|
6
|
+
[](https://www.npmjs.com/package/nolo-cli)
|
|
7
|
+
[](https://github.com/nolotus/nolo-cli/actions/workflows/test.yml)
|
|
8
|
+
[](./LICENSE)
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
`nolo-cli` is a Bun-powered command-line and TUI client for running local and
|
|
11
|
+
remote AI agents around real repository maintenance. It focuses on practical
|
|
12
|
+
open-source maintainer workflows: Codex-assisted review, issue triage, release
|
|
13
|
+
smoke checks, docs updates, runtime diagnostics, and automation-friendly JSON
|
|
14
|
+
commands.
|
|
14
15
|
|
|
15
|
-
The
|
|
16
|
-
small: status line, text input, lightweight slash commands, and script-backed
|
|
17
|
-
Agent chat. A richer Ink UI can replace the rendering layer later without
|
|
18
|
-
changing the session model.
|
|
16
|
+
The project is moving toward a no-login, bring-your-own-key local mode:
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
- `nolo run "review this repository"` runs a local Codex-style agent in the
|
|
19
|
+
current repository without requiring a Nolo account.
|
|
20
|
+
- Authenticated Nolo workflows remain available for synced agents, dialogs,
|
|
21
|
+
docs, tables, and machine-bound automation.
|
|
22
|
+
- The desktop direction is local-first by default: users should be able to run
|
|
23
|
+
with their own OpenAI, Anthropic, OpenRouter, Codex CLI, Qoder, or other
|
|
24
|
+
provider credentials without depending on hosted Nolo infrastructure.
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
Code, Codex CLI, and Copilot CLI are strongest when a developer is already
|
|
26
|
-
inside a codebase. Nolo's CLI should sit between ordinary users and developers:
|
|
27
|
-
one assistant by default, with specialist agents, docs, tables, dialogs, and
|
|
28
|
-
synced workspace data one slash command away.
|
|
29
|
-
|
|
30
|
-
## Usage
|
|
26
|
+
The npm package is published as `nolo-cli`:
|
|
31
27
|
|
|
32
28
|
```bash
|
|
33
29
|
npm install -g nolo-cli
|
|
34
30
|
nolo
|
|
35
|
-
|
|
36
|
-
# see which install you are running
|
|
37
31
|
nolo doctor
|
|
38
32
|
nolo --version
|
|
39
|
-
|
|
40
|
-
# no Nolo login required: runs the local Codex CLI in the current directory
|
|
41
33
|
nolo run "review this repository"
|
|
42
|
-
|
|
43
|
-
# update later from your shell
|
|
44
|
-
nolo update
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Inside the TUI, run:
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
/update
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
The npm package expects Bun to be available because the executable is a Bun
|
|
54
|
-
TypeScript script.
|
|
55
|
-
|
|
56
|
-
For local maintainer workflows, `nolo run "..."` does not require a Nolo
|
|
57
|
-
account. It resolves to the built-in `local-codex` agent, runs in the current
|
|
58
|
-
working directory, and uses the local Codex CLI installation. This is intended
|
|
59
|
-
for repository-local review, triage, and release-check tasks.
|
|
60
|
-
|
|
61
|
-
Remote Nolo records and synced workflows still require a token:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
NOLO_SERVER=https://nolo.chat AUTH_TOKEN=<token> nolo
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Or save a local profile once:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
nolo login --server https://nolo.chat
|
|
71
|
-
nolo whoami
|
|
72
|
-
nolo
|
|
73
34
|
```
|
|
74
35
|
|
|
75
|
-
|
|
76
|
-
authorization. In SSH or browserless environments, use:
|
|
36
|
+
## Why This Matters
|
|
77
37
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
38
|
+
Open-source maintainers are increasingly using coding agents for issue triage,
|
|
39
|
+
pull-request review, release checks, documentation, and repository maintenance.
|
|
40
|
+
Those workflows need more than a single chat box: they need repeatable command
|
|
41
|
+
entry points, local runtime checks, scoped shell permissions, structured
|
|
42
|
+
task/dialog history, release smoke checks, and automation-friendly output.
|
|
81
43
|
|
|
82
|
-
|
|
83
|
-
|
|
44
|
+
`nolo-cli` is aimed at that layer. It is designed to make agent-maintainer
|
|
45
|
+
workflows inspectable and scriptable, while keeping local runtime boundaries
|
|
46
|
+
clear.
|
|
84
47
|
|
|
85
|
-
|
|
86
|
-
nolo login --server https://nolo.chat --token <token>
|
|
87
|
-
```
|
|
48
|
+
## Maintainer Workflows
|
|
88
49
|
|
|
89
|
-
|
|
90
|
-
|
|
50
|
+
The project is built around ongoing maintainer duties that can be reviewed,
|
|
51
|
+
tested, and improved in public:
|
|
91
52
|
|
|
92
|
-
|
|
93
|
-
|
|
53
|
+
- **Pull request review:** run local Codex or another CLI agent against a diff,
|
|
54
|
+
ask for risk-focused review, and keep the review prompt reproducible.
|
|
55
|
+
- **Issue triage:** classify bug reports, installation failures, runtime
|
|
56
|
+
provider issues, and docs gaps into actionable labels.
|
|
57
|
+
- **Release management:** run doctor checks, smoke checks, changelog review,
|
|
58
|
+
and package verification before publishing.
|
|
59
|
+
- **Security review:** keep shell, machine connector, BYOK provider, and token
|
|
60
|
+
boundaries explicit so contributors can reason about local access.
|
|
94
61
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
nolo update
|
|
99
|
-
nolo
|
|
100
|
-
nolo run "review this repository"
|
|
101
|
-
nolo chat "triage the failing tests"
|
|
102
|
-
nolo chat
|
|
103
|
-
nolo connect
|
|
104
|
-
nolo connect --watch
|
|
105
|
-
nolo connect --daemon
|
|
106
|
-
nolo daemon --server-url https://api.nolo.chat --machine-key sk_machine_xxx
|
|
107
|
-
nolo machine status
|
|
108
|
-
nolo run "summarize my latest agent dialogs"
|
|
109
|
-
nolo doc create --title "Trip Notes" --body "hello" --sync local,us --dry-run
|
|
110
|
-
nolo doc create --title "Proxy Notes" --description "Windows setup" --body-file ./proxy.md --sync local,main,us --allow-secrets
|
|
111
|
-
nolo skill-doc create --title "Agent Query Skill" --description "Inspect recent agent dialogs" --body-file ./skill.md --sync local,main,us
|
|
112
|
-
nolo space read 01KKY77TT0DA9NY7TNW3R7255N --content-key page-user-id --brief
|
|
113
|
-
nolo agent list --json
|
|
114
|
-
nolo agent bind-current agent-user-1-agent-1
|
|
115
|
-
nolo agent runtime-doctor agent-user-1-agent-1
|
|
116
|
-
nolo agent smoke-current agent-user-1-agent-1 --msg "ping"
|
|
117
|
-
nolo chat --agent agent-pub-01APPBUILDER00000001YAII3I --msg "你好"
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
For document creation, prefer the CLI over direct scripts. Use `nolo doc create`
|
|
121
|
-
for ordinary pages and `nolo skill-doc create` for skill-backed pages. Both
|
|
122
|
-
support `--sync`, `--dry-run`, `--json`, and `--allow-secrets`, and both write
|
|
123
|
-
for the current auth token user rather than a demo bootstrap user.
|
|
124
|
-
|
|
125
|
-
Experimental machine connector commands:
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
nolo connect # send one machine heartbeat
|
|
129
|
-
nolo connect --watch # keep this terminal process online with periodic heartbeats
|
|
130
|
-
nolo connect --ws # keep a live connector websocket for bound agent runs
|
|
131
|
-
nolo connect --daemon # start connect --ws silently in the background
|
|
132
|
-
nolo daemon --server-url https://api.nolo.chat --machine-key sk_machine_xxx
|
|
133
|
-
nolo machine status # list machines registered to the current profile
|
|
134
|
-
```
|
|
62
|
+
See [MAINTAINER_WORKFLOWS.md](./MAINTAINER_WORKFLOWS.md) for concrete command
|
|
63
|
+
patterns and [OPEN_SOURCE_BOUNDARY.md](./OPEN_SOURCE_BOUNDARY.md) for what is
|
|
64
|
+
being opened versus intentionally kept private.
|
|
135
65
|
|
|
136
|
-
|
|
137
|
-
They do not expose shell, file-write, or raw local LLM endpoints.
|
|
66
|
+
## Public Source
|
|
138
67
|
|
|
139
|
-
|
|
68
|
+
The first reusable source modules are now mirrored in this repository:
|
|
140
69
|
|
|
141
|
-
|
|
142
|
-
nolo
|
|
143
|
-
|
|
70
|
+
- [`src/localRun.ts`](./src/localRun.ts) documents and tests the no-login local
|
|
71
|
+
run contract for `nolo run` and `nolo chat`.
|
|
72
|
+
- [`src/providerConfig.ts`](./src/providerConfig.ts) documents the BYOK
|
|
73
|
+
provider credential boundary: public config stores environment variable
|
|
74
|
+
references, not raw API keys.
|
|
75
|
+
- [`src/runtimeBoundary.ts`](./src/runtimeBoundary.ts) documents the local
|
|
76
|
+
runtime boundary for no-login CLI and desktop flows: local provider
|
|
77
|
+
credentials, workspace-scoped shell policy, local persistence, and no remote
|
|
78
|
+
sync by default.
|
|
79
|
+
- [`src/localRun.test.ts`](./src/localRun.test.ts) verifies that shorthand runs
|
|
80
|
+
use local Codex without requiring Nolo auth, while explicit agent runs remain
|
|
81
|
+
distinct.
|
|
144
82
|
|
|
145
|
-
|
|
83
|
+
Run the public tests with:
|
|
146
84
|
|
|
147
85
|
```bash
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
do not require this flag.
|
|
209
|
-
|
|
210
|
-
For agent config inspection and small config mutations, prefer the CLI-native
|
|
211
|
-
commands instead of ad hoc scripts:
|
|
212
|
-
|
|
213
|
-
- `nolo agent list` is CLI-native and prefers the local cache, then degrades to
|
|
214
|
-
remote query when the local LevelDB cache is unavailable or locked.
|
|
215
|
-
- `nolo agent read <agent>` reads local cached agent records first, then falls
|
|
216
|
-
back to remote fetch + local cache refresh across known server candidates.
|
|
217
|
-
- if the local LevelDB cache is unavailable or locked, `nolo agent read`
|
|
218
|
-
degrades to remote-only lookup instead of hard-failing on the local DB.
|
|
219
|
-
- `nolo agent update <agent> ...` is CLI-native and supports small targeted
|
|
220
|
-
updates such as `--model`, `--cli-provider`, `--api-source`, and repeated
|
|
221
|
-
`--field key=value`.
|
|
222
|
-
|
|
223
|
-
Account ownership matters for private agent maintenance. Default new tests,
|
|
224
|
-
validation dialogs, task-board writes, machine-bound agent runs, and
|
|
225
|
-
user-visible results should write to the current operator account
|
|
226
|
-
`0e95801d90`. The legacy
|
|
227
|
-
`b2e06f801f` / platform-demo account still owns older public/shared records, but
|
|
228
|
-
it is being retired as the default write target. Use `nolo agent read`,
|
|
229
|
-
`nolo agent update`, and repo-native helpers as the normal entrypoints; only
|
|
230
|
-
owner-only operations that explicitly target legacy records should use the
|
|
231
|
-
maintained platform-demo token from `scripts/testUtils.ts` or a regenerated
|
|
232
|
-
token from `scripts/generateToken.ts`. Do not copy token strings into docs,
|
|
233
|
-
logs, or prompts.
|
|
234
|
-
|
|
235
|
-
Inside the current TUI, examples of supported slash commands include:
|
|
236
|
-
`/agent`, `/agents`, `/switch`, `/context` (alias `/ctx`), `/dialog`, `/doc`,
|
|
237
|
-
`/help`, `/new`, `/customize`, `/login`, `/profile`, `/version`, `/quit`
|
|
238
|
-
(alias `/exit`), and `/update` (which maps to `nolo update`).
|
|
239
|
-
|
|
240
|
-
Future product-direction examples for the broader TUI command model:
|
|
241
|
-
|
|
242
|
-
```text
|
|
243
|
-
/agent list
|
|
244
|
-
/agent switch ops
|
|
245
|
-
/dialog open latest
|
|
246
|
-
/doc list
|
|
247
|
-
/table query builtin-dialog-probe-runs
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
See [`docs/nolo-cli-tui.md`](../../docs/nolo-cli-tui.md) for the product and
|
|
251
|
-
technical direction.
|
|
252
|
-
|
|
253
|
-
## Building for Publish
|
|
254
|
-
|
|
255
|
-
The CLI is developed in a monorepo with workspace dependencies (`ai` and
|
|
256
|
-
`connector-experimental`). To generate a publish-safe package that can be
|
|
257
|
-
installed via npm outside the monorepo:
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
bun run build:publish
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
This creates a `dist/` directory with:
|
|
264
|
-
- All source files from the `files` array in package.json
|
|
265
|
-
- Inlined workspace dependencies (copied as nested directories)
|
|
266
|
-
- A modified package.json with workspace dependencies stripped
|
|
267
|
-
|
|
268
|
-
The `dist/` directory is the publish-safe artifact consumed by the CI npm
|
|
269
|
-
publish workflow:
|
|
270
|
-
|
|
271
|
-
```bash
|
|
272
|
-
bun ./scripts/release/prepareCliPublishPackage.ts --out-dir .tmp/nolo-cli-publish
|
|
273
|
-
cd .tmp/nolo-cli-publish
|
|
274
|
-
npm pack
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
For this repository, the default release path for `nolo-cli` is the GitHub
|
|
278
|
-
Actions workflow [`.github/workflows/cli-npm-publish.yml`](../../.github/workflows/cli-npm-publish.yml).
|
|
279
|
-
Use local `npm pack` or tarball-based `npm install -g` as preflight verification.
|
|
280
|
-
Do not treat manual local `npm publish` as the normal release route unless you
|
|
281
|
-
are intentionally debugging the CI publish lane.
|
|
282
|
-
|
|
283
|
-
Key differences between repo-local and published versions:
|
|
284
|
-
- **Repo-local**: Runs from source (`packages/cli/index.ts`) with workspace
|
|
285
|
-
dependencies resolved by the monorepo
|
|
286
|
-
- **Published**: Runs from dist (`dist/index.ts`) with workspace dependencies
|
|
287
|
-
inlined as nested directories
|
|
288
|
-
|
|
289
|
-
Both versions use the same Bun runtime and TypeScript source files. The build
|
|
290
|
-
process does not transpile; it only restructures the package for standalone use.
|
|
86
|
+
bun test src
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Current public source status:
|
|
90
|
+
|
|
91
|
+
| Area | Public evidence |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| No-login local run | `src/localRun.ts`, `src/localRun.test.ts`, passing GitHub Actions |
|
|
94
|
+
| BYOK provider boundary | `src/providerConfig.ts`, `src/providerConfig.test.ts`, PR #8 |
|
|
95
|
+
| Local runtime boundary | `src/runtimeBoundary.ts`, `src/runtimeBoundary.test.ts`, PR #8 |
|
|
96
|
+
| Release management | `RELEASE_CHECKLIST.md`, issue #9 |
|
|
97
|
+
| Source mirror safety | `OPEN_SOURCE_BOUNDARY.md`, `SOURCE_MIRROR_CHECKLIST.md`, issues #1 and #5 |
|
|
98
|
+
|
|
99
|
+
## Project Status
|
|
100
|
+
|
|
101
|
+
This repository is the public OSS entry point for the CLI project. The package
|
|
102
|
+
is actively maintained and has frequent releases on npm. As of June 2026,
|
|
103
|
+
`nolo-cli` source is prepared for version `0.1.45`; npm reports about 3.5k
|
|
104
|
+
downloads for the last-month window ending 2026-06-02. Version `0.1.44` was
|
|
105
|
+
published from the public `nolotus/nolo-cli` GitHub Actions npm workflow, and
|
|
106
|
+
`0.1.45` should be published from the same public workflow after review.
|
|
107
|
+
|
|
108
|
+
The current implementation is developed in a broader private monorepo because
|
|
109
|
+
it shares product infrastructure with Nolo. Public source mirroring is being
|
|
110
|
+
managed in a staged way so that reusable CLI, local runtime, provider adapter,
|
|
111
|
+
desktop local-mode, docs, tests, and maintainer workflow code can be opened
|
|
112
|
+
without exposing private product records, credentials, production operations,
|
|
113
|
+
billing systems, or user-data paths.
|
|
114
|
+
|
|
115
|
+
See [OPEN_SOURCE_STATUS.md](./OPEN_SOURCE_STATUS.md) and
|
|
116
|
+
[ROADMAP.md](./ROADMAP.md) for the public-source migration plan.
|
|
117
|
+
|
|
118
|
+
## Maintenance Scope
|
|
119
|
+
|
|
120
|
+
The public maintenance scope for this project is:
|
|
121
|
+
|
|
122
|
+
- Agent-first terminal and TUI workflows for OSS maintainers.
|
|
123
|
+
- No-login local agent runs in the current repository.
|
|
124
|
+
- BYOK provider configuration for CLI and desktop local mode.
|
|
125
|
+
- Local-first agent runtime boundaries and scoped shell permissions.
|
|
126
|
+
- Runtime doctor, release smoke-check, and package verification workflows.
|
|
127
|
+
- Optional authenticated commands for synced Nolo agents, dialogs, docs, tables,
|
|
128
|
+
and machine connectors.
|
|
129
|
+
|
|
130
|
+
## Links
|
|
131
|
+
|
|
132
|
+
- npm package: https://www.npmjs.com/package/nolo-cli
|
|
133
|
+
- Nolo: https://nolo.chat
|
|
134
|
+
- Maintainer workflows: [MAINTAINER_WORKFLOWS.md](./MAINTAINER_WORKFLOWS.md)
|
|
135
|
+
- Open-source boundary: [OPEN_SOURCE_BOUNDARY.md](./OPEN_SOURCE_BOUNDARY.md)
|
|
136
|
+
- Open-source status: [OPEN_SOURCE_STATUS.md](./OPEN_SOURCE_STATUS.md)
|
|
137
|
+
- Roadmap: [ROADMAP.md](./ROADMAP.md)
|
|
138
|
+
- BYOK provider setup: [docs/provider-setup.md](./docs/provider-setup.md)
|
|
139
|
+
- Desktop local mode: [docs/desktop-local-mode.md](./docs/desktop-local-mode.md)
|
|
140
|
+
- Release checklist: [RELEASE_CHECKLIST.md](./RELEASE_CHECKLIST.md)
|
|
141
|
+
- Source mirror checklist: [SOURCE_MIRROR_CHECKLIST.md](./SOURCE_MIRROR_CHECKLIST.md)
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
MIT
|
package/agentAliases.ts
CHANGED
|
@@ -1,95 +1,25 @@
|
|
|
1
|
-
export const CURRENT_OPERATOR_USER_ID = "0e95801d90";
|
|
2
1
|
export const NOLO_DEFAULT_AGENT_ID = "01NOLOAPPBLD000000019KCKT0";
|
|
3
2
|
export const NOLO_DEFAULT_AGENT_KEY = `agent-pub-${NOLO_DEFAULT_AGENT_ID}`;
|
|
4
|
-
export const NOLO_PROJECT_MANAGER_AGENT_ID = "01NOLOPROJMGR00000000MSVGG";
|
|
5
|
-
export const NOLO_PROJECT_MANAGER_AGENT_KEY =
|
|
6
|
-
`agent-${CURRENT_OPERATOR_USER_ID}-${NOLO_PROJECT_MANAGER_AGENT_ID}`;
|
|
7
|
-
export const NOLO_FRONTEND_AGENT_ID = "01FRONTENDAG0000000115N4E1";
|
|
8
|
-
export const NOLO_FRONTEND_AGENT_KEY =
|
|
9
|
-
`agent-${CURRENT_OPERATOR_USER_ID}-${NOLO_FRONTEND_AGENT_ID}`;
|
|
10
|
-
export const WIN_CODEX_AGENT_ID = "WINCODEX00000000FQ0LK0";
|
|
11
|
-
export const WIN_CODEX_AGENT_KEY =
|
|
12
|
-
`agent-0e95801d90-${WIN_CODEX_AGENT_ID}`;
|
|
13
|
-
export const WIN_QWEN_AGENT_ID = "01CUSTOMCODEA00000001JEAG3";
|
|
14
|
-
export const WIN_QWEN_AGENT_KEY =
|
|
15
|
-
`agent-0e95801d90-${WIN_QWEN_AGENT_ID}`;
|
|
16
|
-
export const MIMO_MONTH_AGENT_ID = "01MIMO25MONTH0000000NEW001";
|
|
17
|
-
export const MIMO_MONTH_AGENT_KEY =
|
|
18
|
-
`agent-0e95801d90-${MIMO_MONTH_AGENT_ID}`;
|
|
19
|
-
export const QODER_AGENT_ID = "01QODERCLIAGENT00000000NEW";
|
|
20
|
-
export const QODER_AGENT_KEY =
|
|
21
|
-
`agent-0e95801d90-${QODER_AGENT_ID}`;
|
|
22
3
|
export const LOCAL_CODEX_AGENT_ID = "01LOCALCODEXCLI000000NEW";
|
|
23
4
|
export const LOCAL_CODEX_AGENT_KEY =
|
|
24
|
-
`agent-${
|
|
5
|
+
`agent-local-${LOCAL_CODEX_AGENT_ID}`;
|
|
25
6
|
export const LOCAL_QODER_AGENT_ID = "01LOCALQODERCLI000000NEW";
|
|
26
7
|
export const LOCAL_QODER_AGENT_KEY =
|
|
27
|
-
`agent-${
|
|
8
|
+
`agent-local-${LOCAL_QODER_AGENT_ID}`;
|
|
28
9
|
|
|
29
10
|
const AGENT_ALIAS_TO_KEY: Record<string, string> = {
|
|
30
11
|
nolo: NOLO_DEFAULT_AGENT_KEY,
|
|
31
12
|
default: NOLO_DEFAULT_AGENT_KEY,
|
|
32
13
|
"default-nolo": NOLO_DEFAULT_AGENT_KEY,
|
|
33
14
|
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
"wincodex": WIN_CODEX_AGENT_KEY,
|
|
37
|
-
"win codex": WIN_CODEX_AGENT_KEY,
|
|
38
|
-
"nolo-reviewer": WIN_CODEX_AGENT_KEY,
|
|
39
|
-
reviewer: WIN_CODEX_AGENT_KEY,
|
|
40
|
-
"nolo-code-review": WIN_CODEX_AGENT_KEY,
|
|
41
|
-
"code-review": WIN_CODEX_AGENT_KEY,
|
|
42
|
-
review: WIN_CODEX_AGENT_KEY,
|
|
43
|
-
"代码审查": WIN_CODEX_AGENT_KEY,
|
|
44
|
-
"nolo 代码审查": WIN_CODEX_AGENT_KEY,
|
|
45
|
-
|
|
46
|
-
// 包月 Mimo (全栈业务代码与常规杂活物理实体)
|
|
47
|
-
"包月mimo": MIMO_MONTH_AGENT_KEY,
|
|
48
|
-
"包月mimo2.5": MIMO_MONTH_AGENT_KEY,
|
|
49
|
-
"mimo-month": MIMO_MONTH_AGENT_KEY,
|
|
50
|
-
"nolo-fullstack": MIMO_MONTH_AGENT_KEY,
|
|
51
|
-
fullstack: MIMO_MONTH_AGENT_KEY,
|
|
52
|
-
"full-stack": MIMO_MONTH_AGENT_KEY,
|
|
53
|
-
"全栈": MIMO_MONTH_AGENT_KEY,
|
|
54
|
-
"nolo 全栈工程师": MIMO_MONTH_AGENT_KEY,
|
|
55
|
-
|
|
56
|
-
// Qoder CLI (本机 Qoder CLI 实现 agent)
|
|
57
|
-
qoder: QODER_AGENT_KEY,
|
|
58
|
-
"qoder-agent": QODER_AGENT_KEY,
|
|
59
|
-
"qoder cli": QODER_AGENT_KEY,
|
|
60
|
-
"qoder-cli": QODER_AGENT_KEY,
|
|
61
|
-
|
|
62
|
-
// Explicit local CLI agents. These are ordinary private agent records that
|
|
63
|
-
// run through the current computer local runtime when unbound.
|
|
15
|
+
// Explicit local CLI agents. These are ordinary user-scoped agent records
|
|
16
|
+
// that run through the current computer local runtime when unbound.
|
|
64
17
|
"local-codex": LOCAL_CODEX_AGENT_KEY,
|
|
65
18
|
"codex-local": LOCAL_CODEX_AGENT_KEY,
|
|
66
19
|
"local codex": LOCAL_CODEX_AGENT_KEY,
|
|
67
20
|
"local-qoder": LOCAL_QODER_AGENT_KEY,
|
|
68
21
|
"qoder-local": LOCAL_QODER_AGENT_KEY,
|
|
69
22
|
"local qoder": LOCAL_QODER_AGENT_KEY,
|
|
70
|
-
|
|
71
|
-
// 产品前端实现
|
|
72
|
-
"frontend": NOLO_FRONTEND_AGENT_KEY,
|
|
73
|
-
"frontend-agent": NOLO_FRONTEND_AGENT_KEY,
|
|
74
|
-
"frontend-implementer": NOLO_FRONTEND_AGENT_KEY,
|
|
75
|
-
"nolo-frontend": NOLO_FRONTEND_AGENT_KEY,
|
|
76
|
-
"nolo frontend": NOLO_FRONTEND_AGENT_KEY,
|
|
77
|
-
"前端agent": NOLO_FRONTEND_AGENT_KEY,
|
|
78
|
-
"前端 agent": NOLO_FRONTEND_AGENT_KEY,
|
|
79
|
-
"前端": NOLO_FRONTEND_AGENT_KEY,
|
|
80
|
-
|
|
81
|
-
// Win Qwen (本地轻量无Token消耗辅助)
|
|
82
|
-
"win-qwen": WIN_QWEN_AGENT_KEY,
|
|
83
|
-
"win qwen": WIN_QWEN_AGENT_KEY,
|
|
84
|
-
"winqwen": WIN_QWEN_AGENT_KEY,
|
|
85
|
-
|
|
86
|
-
// 其他辅助/特定角色
|
|
87
|
-
"nolo-project-manager": NOLO_PROJECT_MANAGER_AGENT_KEY,
|
|
88
|
-
"project-manager": NOLO_PROJECT_MANAGER_AGENT_KEY,
|
|
89
|
-
"nolo-pm": NOLO_PROJECT_MANAGER_AGENT_KEY,
|
|
90
|
-
pm: NOLO_PROJECT_MANAGER_AGENT_KEY,
|
|
91
|
-
"项目经理": NOLO_PROJECT_MANAGER_AGENT_KEY,
|
|
92
|
-
"nolo 项目经理": NOLO_PROJECT_MANAGER_AGENT_KEY,
|
|
93
23
|
};
|
|
94
24
|
|
|
95
25
|
function parseAgentKeyFromInput(raw: string): string {
|
package/agentMachineCommands.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MachineHeartbeat } from "./connector-experimental/protocol";
|
|
2
2
|
import { resolveConnectorWebSocketTarget } from "./connectorWebSocketTarget";
|
|
3
|
-
import {
|
|
3
|
+
import { resolveAgentInput } from "./agentNameResolver";
|
|
4
4
|
import {
|
|
5
5
|
type AgentCommandDeps,
|
|
6
6
|
type LocalCliExecutor,
|
|
@@ -173,10 +173,10 @@ export async function runAgentBindCurrentCommand(
|
|
|
173
173
|
) {
|
|
174
174
|
const env = deps.env ?? process.env;
|
|
175
175
|
const output = deps.output ?? process.stdout;
|
|
176
|
-
const
|
|
177
|
-
if (!
|
|
178
|
-
output.write("Usage: nolo agent bind-current <
|
|
179
|
-
return
|
|
176
|
+
const agentInput = args[0]?.trim();
|
|
177
|
+
if (!agentInput || agentInput === "--help" || agentInput === "-h") {
|
|
178
|
+
output.write("Usage: nolo agent bind-current <agent>\n");
|
|
179
|
+
return agentInput ? 0 : 1;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
const authToken = resolveAuthToken(env);
|
|
@@ -197,6 +197,15 @@ export async function runAgentBindCurrentCommand(
|
|
|
197
197
|
const machine = await (deps.machineInfo ?? detectLaunchableMachineInfo)();
|
|
198
198
|
|
|
199
199
|
try {
|
|
200
|
+
const { agentKey } = await resolveAgentInput({
|
|
201
|
+
agentInput,
|
|
202
|
+
authToken,
|
|
203
|
+
db: deps.db,
|
|
204
|
+
env,
|
|
205
|
+
fallbackFetchImpl,
|
|
206
|
+
fetchImpl,
|
|
207
|
+
output,
|
|
208
|
+
});
|
|
200
209
|
await heartbeatCurrentMachine({ authToken, fetchImpl, machine, serverUrl });
|
|
201
210
|
const existing = await readAgentRecord({ agentKey, authToken, fallbackFetchImpl, fetchImpl, serverUrl });
|
|
202
211
|
const updated = {
|
|
@@ -228,7 +237,7 @@ export async function runAgentBindCurrentCommand(
|
|
|
228
237
|
return 1;
|
|
229
238
|
}
|
|
230
239
|
|
|
231
|
-
output.write(`Bound agent ${
|
|
240
|
+
output.write(`Bound agent ${agentInput} to this machine: ${machine.name} (${machine.machineId})\n`);
|
|
232
241
|
return 0;
|
|
233
242
|
}
|
|
234
243
|
|
|
@@ -243,8 +252,6 @@ export async function runAgentSmokeCurrentCommand(
|
|
|
243
252
|
output.write("Usage: nolo agent smoke-current <agent> --msg \"hello\"\n");
|
|
244
253
|
return agentInput ? 0 : 1;
|
|
245
254
|
}
|
|
246
|
-
const agentKey = resolveCliAgentKeyInput(agentInput);
|
|
247
|
-
|
|
248
255
|
const authToken = resolveAuthToken(env);
|
|
249
256
|
if (!authToken) {
|
|
250
257
|
output.write("[nolo] agent smoke-current requires an auth token. Run `nolo login` or set AUTH_TOKEN.\n");
|
|
@@ -264,6 +271,15 @@ export async function runAgentSmokeCurrentCommand(
|
|
|
264
271
|
const sentMessages: string[] = [];
|
|
265
272
|
|
|
266
273
|
try {
|
|
274
|
+
const { agentKey } = await resolveAgentInput({
|
|
275
|
+
agentInput,
|
|
276
|
+
authToken,
|
|
277
|
+
db: deps.db,
|
|
278
|
+
env,
|
|
279
|
+
fallbackFetchImpl,
|
|
280
|
+
fetchImpl,
|
|
281
|
+
output,
|
|
282
|
+
});
|
|
267
283
|
await heartbeatCurrentMachine({ authToken, fetchImpl, machine, serverUrl });
|
|
268
284
|
const existing = await readAgentRecord({ agentKey, authToken, fallbackFetchImpl, fetchImpl, serverUrl });
|
|
269
285
|
assertSmokeCompatible(existing, machine);
|
|
@@ -358,8 +374,6 @@ export async function runAgentRuntimeDoctorCommand(
|
|
|
358
374
|
output.write("Usage: nolo agent runtime-doctor <agentKey>\n");
|
|
359
375
|
return agentInput ? 0 : 1;
|
|
360
376
|
}
|
|
361
|
-
const agentKey = resolveCliAgentKeyInput(agentInput);
|
|
362
|
-
|
|
363
377
|
const authToken = resolveAuthToken(env);
|
|
364
378
|
if (!authToken) {
|
|
365
379
|
output.write("[nolo] agent runtime-doctor requires an auth token. Run `nolo login` or set AUTH_TOKEN.\n");
|
|
@@ -372,6 +386,15 @@ export async function runAgentRuntimeDoctorCommand(
|
|
|
372
386
|
const machine = await (deps.machineInfo ?? detectLaunchableMachineInfo)();
|
|
373
387
|
|
|
374
388
|
try {
|
|
389
|
+
const { agentKey } = await resolveAgentInput({
|
|
390
|
+
agentInput,
|
|
391
|
+
authToken,
|
|
392
|
+
db: deps.db,
|
|
393
|
+
env,
|
|
394
|
+
fallbackFetchImpl,
|
|
395
|
+
fetchImpl,
|
|
396
|
+
output,
|
|
397
|
+
});
|
|
375
398
|
const agent = await readAgentRecord({ agentKey, authToken, fallbackFetchImpl, fetchImpl, serverUrl });
|
|
376
399
|
const requiredCapability = requiredCapabilityForAgent(agent);
|
|
377
400
|
const runtimeClass = classifyAgentRuntime(agent);
|