nolo-cli 0.1.11 → 0.1.13
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 +45 -0
- package/agentRuntimeCommands.ts +6 -4
- package/ai/agent/agentSlice.ts +2 -0
- package/ai/agent/cliExecutor.ts +733 -0
- package/ai/agent/cliPrompt.ts +10 -0
- package/ai/agent/machineRunPermissions.ts +95 -0
- package/ai/agent.ts +2 -0
- package/ai/index.ts +1 -0
- package/authCommands.ts +185 -21
- package/client/compactDialog.ts +222 -0
- package/commandRegistry.ts +2 -0
- package/connector-experimental/capabilities.ts +73 -0
- package/connector-experimental/codexBinary.ts +41 -0
- package/connector-experimental/heartbeatLoop.ts +22 -0
- package/connector-experimental/machineInfo.ts +46 -0
- package/connector-experimental/protocol.ts +54 -0
- package/machineCommands.ts +5 -5
- package/package.json +7 -11
package/README.md
CHANGED
|
@@ -62,6 +62,20 @@ nolo whoami
|
|
|
62
62
|
nolo
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
+
By default, `nolo login` opens the Nolo website and waits for browser
|
|
66
|
+
authorization. In SSH or browserless environments, use:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
nolo login --no-browser
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Then open the printed URL on a logged-in browser. Automation can still save a
|
|
73
|
+
token directly:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
nolo login --server https://nolo.chat --token <token>
|
|
77
|
+
```
|
|
78
|
+
|
|
65
79
|
Local repo development can still use the script bridge without `AUTH_TOKEN`.
|
|
66
80
|
|
|
67
81
|
Inside the TUI, `/update` is the shortcut for the same global `nolo update`
|
|
@@ -171,3 +185,34 @@ Future product-direction examples for the broader TUI command model:
|
|
|
171
185
|
|
|
172
186
|
See [`docs/nolo-cli-tui.md`](../../docs/nolo-cli-tui.md) for the product and
|
|
173
187
|
technical direction.
|
|
188
|
+
|
|
189
|
+
## Building for Publish
|
|
190
|
+
|
|
191
|
+
The CLI is developed in a monorepo with workspace dependencies (`ai` and
|
|
192
|
+
`connector-experimental`). To generate a publish-safe package that can be
|
|
193
|
+
installed via npm outside the monorepo:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
bun run build:publish
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
This creates a `dist/` directory with:
|
|
200
|
+
- All source files from the `files` array in package.json
|
|
201
|
+
- Inlined workspace dependencies (copied as nested directories)
|
|
202
|
+
- A modified package.json with workspace dependencies stripped
|
|
203
|
+
|
|
204
|
+
The `dist/` directory can be published to npm:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
cd dist
|
|
208
|
+
npm publish
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Key differences between repo-local and published versions:
|
|
212
|
+
- **Repo-local**: Runs from source (`packages/cli/index.ts`) with workspace
|
|
213
|
+
dependencies resolved by the monorepo
|
|
214
|
+
- **Published**: Runs from dist (`dist/index.ts`) with workspace dependencies
|
|
215
|
+
inlined as nested directories
|
|
216
|
+
|
|
217
|
+
Both versions use the same Bun runtime and TypeScript source files. The build
|
|
218
|
+
process does not transpile; it only restructures the package for standalone use.
|
package/agentRuntimeCommands.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { MachineHeartbeat } from "connector-experimental/protocol";
|
|
2
|
-
import { detectMachineInfo } from "connector-experimental/machineInfo";
|
|
1
|
+
import type { MachineHeartbeat } from "./connector-experimental/protocol";
|
|
2
|
+
import { detectMachineInfo } from "./connector-experimental/machineInfo";
|
|
3
3
|
import {
|
|
4
4
|
assertMachineRunAllowed,
|
|
5
5
|
buildMachinePermissionPromptBlock,
|
|
6
6
|
resolveMachineRunPermissionPolicy,
|
|
7
|
-
} from "
|
|
7
|
+
} from "./ai/agent/machineRunPermissions";
|
|
8
8
|
import { resolveConnectorWebSocketTarget } from "./connectorWebSocketTarget";
|
|
9
9
|
import { DEFAULT_NOLO_SERVER_URL } from "./defaultServer";
|
|
10
10
|
|
|
@@ -56,7 +56,7 @@ function readOption(args: string[], flag: string) {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
async function defaultExecuteCli(provider: string, prompt: string, options: { model?: string; yolo?: boolean }) {
|
|
59
|
-
const { executeCli } = await import("ai/agent/cliExecutor");
|
|
59
|
+
const { executeCli } = await import("./ai/agent/cliExecutor");
|
|
60
60
|
return executeCli(provider as any, prompt, options);
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -286,6 +286,7 @@ export async function runAgentBindCurrentCommand(
|
|
|
286
286
|
? existing.runtimeBinding
|
|
287
287
|
: {}),
|
|
288
288
|
machineId: machine.machineId,
|
|
289
|
+
ownerUserId: userId,
|
|
289
290
|
},
|
|
290
291
|
updatedAt: Date.now(),
|
|
291
292
|
};
|
|
@@ -356,6 +357,7 @@ export async function runAgentSmokeCurrentCommand(
|
|
|
356
357
|
? existing.runtimeBinding
|
|
357
358
|
: {}),
|
|
358
359
|
machineId: machine.machineId,
|
|
360
|
+
ownerUserId: userId,
|
|
359
361
|
},
|
|
360
362
|
updatedAt: Date.now(),
|
|
361
363
|
},
|