nolo-cli 0.1.32 → 0.1.34
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 +4 -10
- package/agent-runtime/agentRecordConfig.ts +10 -0
- package/agent-runtime/hostAdapter.ts +10 -1
- package/agent-runtime/index.ts +9 -20
- package/agent-runtime/localLoop.ts +49 -2
- package/agent-runtime/localToolPolicy.ts +76 -34
- package/agent-runtime/localWorkspaceTools.ts +30 -333
- package/agent-runtime/openAiCompatibleProvider.ts +7 -3
- package/agent-runtime/openAiCompatibleProviderConfig.ts +15 -26
- package/agent-runtime/platformChatProvider.ts +47 -73
- package/agent-runtime/providerResolution.ts +244 -0
- package/agent-runtime/runtimeToolPolicy.ts +77 -29
- package/agent-runtime/shellCommandPolicy.ts +120 -0
- package/agentAliases.ts +14 -83
- package/agentCommandSupport.ts +3 -6
- package/agentInternalCommandEntries.ts +4 -13
- package/agentListCommands.ts +18 -27
- package/agentMachineCommands.ts +40 -336
- package/agentPullCommand.ts +30 -55
- package/agentRecordCommands.ts +84 -1
- package/agentRecordHelpers.ts +102 -186
- package/agentRunCommand.ts +438 -107
- package/agentRuntimeLocal.ts +2 -9
- package/ai/agent/cliExecutor.ts +19 -323
- package/ai/tools/toolNameAliases.ts +70 -0
- package/authCommands.ts +2 -36
- package/cli/agentAliases.ts +14 -83
- package/cli/agentCommandSupport.ts +3 -6
- package/cli/agentInternalCommandEntries.ts +4 -13
- package/cli/agentListCommands.ts +18 -27
- package/cli/agentMachineCommands.ts +40 -336
- package/cli/agentPullCommand.ts +30 -55
- package/cli/agentRecordCommands.ts +84 -1
- package/cli/agentRecordHelpers.ts +102 -186
- package/cli/agentRunCommand.ts +438 -107
- package/cli/agentRuntimeLocal.ts +2 -9
- package/cli/authCommands.ts +2 -36
- package/cli/cliCommandDispatch.ts +2 -2
- package/cli/cliEnvHelpers.ts +34 -107
- package/cli/client/agentRun.ts +854 -57
- package/cli/client/localRuntimeAdapter.ts +59 -159
- package/cli/client/streamingOutput.ts +3 -1
- package/cli/client/taskRunPrompt.ts +24 -7
- package/cli/commandRegistry.ts +4 -5
- package/cli/connectorRunArtifact.ts +10 -34
- package/cli/connectorWebSocketTarget.ts +6 -10
- package/cli/internalCommandEntries.ts +0 -8
- package/cli/localRuntimeDb.ts +2 -39
- package/cli/machineCommands.ts +189 -190
- package/cli/machineDaemonCommands.ts +165 -9
- package/cli/machineHeartbeatCommands.ts +2 -1
- package/cli/machineStatusCommands.ts +13 -5
- package/cli/machineWatchCommands.ts +1 -1
- package/cli/machineWsRunDispatch.ts +30 -44
- package/cli/machineWsSession.ts +0 -2
- package/cli/offlineMarxistsAgentCommand.ts +314 -0
- package/cli/runtimeDoctorCommands.ts +72 -15
- package/cli/scriptCommandEntries.ts +45 -5
- package/cli/tableCommands.ts +133 -33
- package/cli/taskRunCommand.ts +211 -16
- package/cli/tui/session.ts +372 -43
- package/cli/workflowInternalCommandEntries.ts +0 -20
- package/cliCommandDispatch.ts +2 -2
- package/cliEnvHelpers.ts +34 -107
- package/client/agentConfigResolver.test.ts +2 -0
- package/client/agentRun.test.ts +12 -208
- package/client/agentRun.ts +854 -57
- package/client/localProviderResolver.test.ts +26 -2
- package/client/localRuntimeAdapter.test.ts +296 -171
- package/client/localRuntimeAdapter.ts +59 -159
- package/client/localToolPolicy.test.ts +4 -28
- package/client/streamingOutput.ts +3 -1
- package/client/taskRunPrompt.ts +24 -7
- package/commandRegistry.ts +4 -5
- package/connectorRunArtifact.ts +10 -34
- package/connectorWebSocketTarget.ts +6 -10
- package/database/server/serverStoreFactory.ts +2 -8
- package/internalCommandEntries.ts +0 -8
- package/localRuntimeDb.ts +2 -39
- package/machineCommands.ts +189 -190
- package/machineDaemonCommands.ts +165 -9
- package/machineHeartbeatCommands.ts +2 -1
- package/machineStatusCommands.ts +13 -5
- package/machineWatchCommands.ts +1 -1
- package/machineWsRunDispatch.ts +30 -44
- package/machineWsSession.ts +0 -2
- package/offlineMarxistsAgentCommand.ts +314 -0
- package/package.json +52 -188
- package/runtimeDoctorCommands.ts +72 -15
- package/scriptCommandEntries.ts +45 -5
- package/tableCommands.ts +133 -33
- package/taskRunCommand.ts +211 -16
- package/tui/session.ts +372 -43
- package/workflowInternalCommandEntries.ts +0 -20
- package/agent-runtime/dialogStatus.ts +0 -139
- package/agent-runtime/hostRuntimeConfig.ts +0 -86
- package/agentCreateCustomCommands.ts +0 -278
- package/agentDialogsCommands.ts +0 -227
- package/agentDoctorCommands.ts +0 -203
- package/agentRunLocalWorkspace.ts +0 -182
- package/agentRunParsing.ts +0 -298
- package/agentSuperviseCommands.ts +0 -8
- package/agentUnpublishCommands.ts +0 -113
- package/ai/agent/agentRunDialogLineage.ts +0 -56
- package/ai/policy/types.ts +0 -64
- package/ai/skills/skillSummaryMarker.ts +0 -26
- package/app/types.ts +0 -358
- package/build.ts +0 -16
- package/buildPublish.ts +0 -138
- package/buildPublishArtifactAssembly.ts +0 -724
- package/buildPublishImportAnalysis.ts +0 -242
- package/chat/messages/fetchMessages.ts +0 -84
- package/chat/messages/types.ts +0 -185
- package/cli/agentCreateCustomCommands.ts +0 -278
- package/cli/agentDialogsCommands.ts +0 -227
- package/cli/agentDoctorCommands.ts +0 -203
- package/cli/agentRunLocalWorkspace.ts +0 -182
- package/cli/agentRunParsing.ts +0 -298
- package/cli/agentSuperviseCommands.ts +0 -8
- package/cli/agentUnpublishCommands.ts +0 -113
- package/cli/buildPublish.ts +0 -138
- package/cli/buildPublishArtifactAssembly.ts +0 -724
- package/cli/buildPublishImportAnalysis.ts +0 -242
- package/cli/cliIoTypes.ts +0 -3
- package/cli/cliRuntimeDoctorReport.ts +0 -193
- package/cli/client/agentRunInput.ts +0 -10
- package/cli/client/agentRunLocalExecution.ts +0 -124
- package/cli/client/agentRunLocalExecutor.ts +0 -179
- package/cli/client/agentRunRuntimeSelection.ts +0 -145
- package/cli/client/agentRunServerTransport.ts +0 -397
- package/cli/client/agentRunTaskRunRecorder.ts +0 -176
- package/cli/customCodingAgentFlow.ts +0 -208
- package/cli/customCodingAgentRecord.ts +0 -179
- package/cli/dialogDataAccess.ts +0 -186
- package/cli/dialogInternalCommandEntries.ts +0 -11
- package/cli/dialogReadCommands.ts +0 -180
- package/cli/dialogReadHelpers.ts +0 -226
- package/cli/dialogStatusCommands.ts +0 -123
- package/cli/docInternalCommandEntries.ts +0 -20
- package/cli/hybridReadHelpers.ts +0 -109
- package/cli/machineCommandPrompts.ts +0 -79
- package/cli/machineCommandResolution.ts +0 -43
- package/cli/noloReadBridgePrompt.ts +0 -16
- package/cli/pageCreateCommands.ts +0 -219
- package/cli/pageDeleteCommands.ts +0 -167
- package/cli/pageReadCommands.ts +0 -151
- package/cli/pageUpdateCommands.ts +0 -249
- package/cli/pageWriteHelpers.ts +0 -209
- package/cli/publishPackage.ts +0 -36
- package/cli/runtimeInternalCommandEntries.ts +0 -15
- package/cli/runtimePassthroughCommands.ts +0 -22
- package/cli/scriptPassthroughHelpers.ts +0 -28
- package/cli/secretScanHelpers.ts +0 -31
- package/cli/spaceAttachCommands.ts +0 -134
- package/cli/spaceCategoryCommands.ts +0 -263
- package/cli/spaceCommands.ts +0 -295
- package/cli/spaceDeleteCommands.ts +0 -312
- package/cli/spaceInternalCommandEntries.ts +0 -21
- package/cli/spaceMutationHelpers.ts +0 -135
- package/cli/spaceReadCommands.ts +0 -323
- package/cli/tableDataOutput.ts +0 -41
- package/cli/tableDataSafety.ts +0 -26
- package/cli/tableMetaCommands.ts +0 -307
- package/cli/tableMutationCommands.ts +0 -266
- package/cli/tableQueryParsing.ts +0 -90
- package/cli/tableQueryRequest.ts +0 -53
- package/cli/taskRunActions.ts +0 -122
- package/cli/taskRunParsing.ts +0 -86
- package/cli/taskRunPromptShared.ts +0 -55
- package/cli/tui/tuiCatalog.ts +0 -22
- package/cli/tui/tuiCommandInterpreter.ts +0 -253
- package/cli/tui/tuiPresentation.ts +0 -146
- package/cliIoTypes.ts +0 -3
- package/cliRuntimeDoctorReport.ts +0 -193
- package/client/agentRunInput.ts +0 -10
- package/client/agentRunLocalExecution.test.ts +0 -123
- package/client/agentRunLocalExecution.ts +0 -124
- package/client/agentRunLocalExecutor.ts +0 -179
- package/client/agentRunRuntimeSelection.test.ts +0 -159
- package/client/agentRunRuntimeSelection.ts +0 -145
- package/client/agentRunServerTransport.ts +0 -397
- package/client/agentRunTaskRunRecorder.ts +0 -176
- package/connector-experimental/daemonLauncher.ts +0 -223
- package/create/space/spaceKeys.ts +0 -65
- package/create/types.ts +0 -21
- package/customCodingAgentFlow.ts +0 -208
- package/customCodingAgentRecord.ts +0 -179
- package/database/keys.ts +0 -765
- package/database/tombstones.ts +0 -52
- package/database/utils/ulid.ts +0 -1
- package/dialogDataAccess.ts +0 -186
- package/dialogInternalCommandEntries.ts +0 -11
- package/dialogReadCommands.ts +0 -180
- package/dialogReadHelpers.ts +0 -226
- package/dialogStatusCommands.ts +0 -123
- package/docInternalCommandEntries.ts +0 -20
- package/hybridReadHelpers.ts +0 -109
- package/machineCommandPrompts.ts +0 -79
- package/machineCommandResolution.ts +0 -43
- package/noloReadBridgePrompt.ts +0 -16
- package/pageCreateCommands.ts +0 -219
- package/pageDeleteCommands.ts +0 -167
- package/pageReadCommands.ts +0 -151
- package/pageUpdateCommands.ts +0 -249
- package/pageWriteHelpers.ts +0 -209
- package/publishPackage.ts +0 -36
- package/runtimeInternalCommandEntries.ts +0 -15
- package/runtimePassthroughCommands.ts +0 -22
- package/scriptPassthroughHelpers.ts +0 -28
- package/secretScanHelpers.ts +0 -31
- package/share/helpers.ts +0 -302
- package/share/keys.ts +0 -243
- package/share/types.ts +0 -100
- package/spaceAttachCommands.ts +0 -134
- package/spaceCategoryCommands.ts +0 -263
- package/spaceCommands.ts +0 -295
- package/spaceDeleteCommands.ts +0 -312
- package/spaceInternalCommandEntries.ts +0 -21
- package/spaceMutationHelpers.ts +0 -135
- package/spaceReadCommands.ts +0 -323
- package/tableDataOutput.ts +0 -41
- package/tableDataSafety.ts +0 -26
- package/tableMetaCommands.ts +0 -307
- package/tableMutationCommands.ts +0 -266
- package/tableQueryParsing.ts +0 -90
- package/tableQueryRequest.ts +0 -53
- package/taskRunActions.ts +0 -122
- package/taskRunParsing.ts +0 -86
- package/taskRunPromptShared.ts +0 -55
- package/tui/tuiCatalog.ts +0 -22
- package/tui/tuiCommandInterpreter.test.ts +0 -169
- package/tui/tuiCommandInterpreter.ts +0 -253
- package/tui/tuiPresentation.test.ts +0 -154
- package/tui/tuiPresentation.ts +0 -146
package/client/agentRun.test.ts
CHANGED
|
@@ -49,8 +49,8 @@ describe("cli agent run client", () => {
|
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
test("calls the Nolo HTTP API directly when AUTH_TOKEN is present", async () => {
|
|
52
|
-
const output = new CaptureOutput();
|
|
53
|
-
const requests: Array<{ url: string; body: any; auth: string | null }> = [];
|
|
52
|
+
const output = new CaptureOutput();
|
|
53
|
+
const requests: Array<{ url: string; body: any; auth: string | null }> = [];
|
|
54
54
|
|
|
55
55
|
const result = await runAgentTurn({
|
|
56
56
|
agentName: "nolo",
|
|
@@ -97,124 +97,10 @@ describe("cli agent run client", () => {
|
|
|
97
97
|
]);
|
|
98
98
|
expect(result).toEqual({ exitCode: 0, dialogId: "dialog-1" });
|
|
99
99
|
expect(output.text()).toContain("nolo -> working");
|
|
100
|
-
expect(output.text()).toContain("nolo > hi");
|
|
100
|
+
expect(output.text()).toContain("nolo > hi");
|
|
101
101
|
expect(output.text()).not.toContain("tokens=");
|
|
102
102
|
});
|
|
103
103
|
|
|
104
|
-
test("retries machine-bound cluster runs on a sibling server when the primary registry is unavailable", async () => {
|
|
105
|
-
const output = new CaptureOutput();
|
|
106
|
-
const requests: string[] = [];
|
|
107
|
-
|
|
108
|
-
const result = await runAgentTurn({
|
|
109
|
-
agentName: "frontend",
|
|
110
|
-
agentKey: "frontend-implementer",
|
|
111
|
-
serverUrl: "https://nolo.chat",
|
|
112
|
-
message: "hello",
|
|
113
|
-
scriptDir: "C:/missing/scripts",
|
|
114
|
-
env: { AUTH_TOKEN: "token-123" },
|
|
115
|
-
output,
|
|
116
|
-
runtimeMode: "server",
|
|
117
|
-
scriptPathExists: () => false,
|
|
118
|
-
fetchImpl: async (url) => {
|
|
119
|
-
requests.push(String(url));
|
|
120
|
-
if (String(url) === "https://nolo.chat/api/agent/run") {
|
|
121
|
-
return Response.json({
|
|
122
|
-
error: "Runtime binding unavailable",
|
|
123
|
-
reason: "bound_machine_unavailable",
|
|
124
|
-
message: "Bound runtime machine is not available on this cluster node.",
|
|
125
|
-
}, { status: 409 });
|
|
126
|
-
}
|
|
127
|
-
return Response.json({
|
|
128
|
-
content: "cluster ok",
|
|
129
|
-
dialogId: "dialog-us",
|
|
130
|
-
});
|
|
131
|
-
},
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
expect(result).toEqual({ exitCode: 0, dialogId: "dialog-us" });
|
|
135
|
-
expect(requests).toEqual([
|
|
136
|
-
"https://nolo.chat/api/agent/run",
|
|
137
|
-
"https://us.nolo.chat/api/agent/run",
|
|
138
|
-
]);
|
|
139
|
-
expect(output.text()).toContain("retrying https://us.nolo.chat");
|
|
140
|
-
expect(output.text()).toContain("frontend > cluster ok");
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
test("follows an explicit retryServerBase hint before cluster sibling fallback", async () => {
|
|
144
|
-
const output = new CaptureOutput();
|
|
145
|
-
const requests: string[] = [];
|
|
146
|
-
|
|
147
|
-
const result = await runAgentTurn({
|
|
148
|
-
agentName: "frontend",
|
|
149
|
-
agentKey: "frontend-implementer",
|
|
150
|
-
serverUrl: "https://router.nolo.chat",
|
|
151
|
-
message: "hello",
|
|
152
|
-
scriptDir: "C:/missing/scripts",
|
|
153
|
-
env: { AUTH_TOKEN: "token-123" },
|
|
154
|
-
output,
|
|
155
|
-
runtimeMode: "server",
|
|
156
|
-
scriptPathExists: () => false,
|
|
157
|
-
fetchImpl: async (url) => {
|
|
158
|
-
requests.push(String(url));
|
|
159
|
-
if (String(url) === "https://router.nolo.chat/api/agent/run") {
|
|
160
|
-
return Response.json({
|
|
161
|
-
error: "Runtime binding unavailable",
|
|
162
|
-
reason: "bound_machine_unavailable",
|
|
163
|
-
message: "Bound runtime machine is not available on this cluster node.",
|
|
164
|
-
retryServerBase: "https://us.nolo.chat",
|
|
165
|
-
}, { status: 409 });
|
|
166
|
-
}
|
|
167
|
-
return Response.json({
|
|
168
|
-
content: "sticky ok",
|
|
169
|
-
dialogId: "dialog-sticky",
|
|
170
|
-
});
|
|
171
|
-
},
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
expect(result).toEqual({ exitCode: 0, dialogId: "dialog-sticky" });
|
|
175
|
-
expect(requests).toEqual([
|
|
176
|
-
"https://router.nolo.chat/api/agent/run",
|
|
177
|
-
"https://us.nolo.chat/api/agent/run",
|
|
178
|
-
]);
|
|
179
|
-
expect(output.text()).toContain("retrying https://us.nolo.chat");
|
|
180
|
-
expect(output.text()).toContain("frontend > sticky ok");
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
test("does not retry sibling cluster nodes on owner mismatch and prints the detailed binding message", async () => {
|
|
184
|
-
const output = new CaptureOutput();
|
|
185
|
-
const requests: string[] = [];
|
|
186
|
-
|
|
187
|
-
const result = await runAgentTurn({
|
|
188
|
-
agentName: "frontend",
|
|
189
|
-
agentKey: "frontend-implementer",
|
|
190
|
-
serverUrl: "https://nolo.chat",
|
|
191
|
-
message: "hello",
|
|
192
|
-
scriptDir: "C:/missing/scripts",
|
|
193
|
-
env: { AUTH_TOKEN: "token-123" },
|
|
194
|
-
output,
|
|
195
|
-
runtimeMode: "server",
|
|
196
|
-
scriptPathExists: () => false,
|
|
197
|
-
fetchImpl: async (url) => {
|
|
198
|
-
requests.push(String(url));
|
|
199
|
-
return Response.json({
|
|
200
|
-
error: "Runtime binding unavailable",
|
|
201
|
-
reason: "bound_machine_owner_mismatch",
|
|
202
|
-
message:
|
|
203
|
-
"Bound runtime machine machine-main is online for the current caller account, " +
|
|
204
|
-
"but this agent is bound to a different runtimeBinding.ownerUserId. " +
|
|
205
|
-
"Rebind the agent or connect the machine under the binding owner account.",
|
|
206
|
-
}, { status: 409 });
|
|
207
|
-
},
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
expect(result).toEqual({ exitCode: 1 });
|
|
211
|
-
expect(requests).toEqual(["https://nolo.chat/api/agent/run"]);
|
|
212
|
-
expect(output.text()).toContain("Runtime binding unavailable");
|
|
213
|
-
expect(output.text()).toContain("Bound runtime machine machine-main is online for the current caller account");
|
|
214
|
-
expect(output.text()).toContain("reason=bound_machine_owner_mismatch");
|
|
215
|
-
expect(output.text()).not.toContain("retrying https://us.nolo.chat");
|
|
216
|
-
});
|
|
217
|
-
|
|
218
104
|
test("prepends task-run context for HTTP agent runs", async () => {
|
|
219
105
|
const output = new CaptureOutput();
|
|
220
106
|
const requests: Array<{ body: any }> = [];
|
|
@@ -363,66 +249,6 @@ describe("cli agent run client", () => {
|
|
|
363
249
|
expect(result).toEqual({ exitCode: 0, dialogId: "dialog-1" });
|
|
364
250
|
});
|
|
365
251
|
|
|
366
|
-
test("drops inherited lineage when continueDialogId is authoritative for HTTP runs and trims it", async () => {
|
|
367
|
-
const output = new CaptureOutput();
|
|
368
|
-
const requests: Array<{ body: any }> = [];
|
|
369
|
-
|
|
370
|
-
await runAgentTurn({
|
|
371
|
-
agentName: "nolo",
|
|
372
|
-
agentKey: "agent-pub-test",
|
|
373
|
-
serverUrl: "https://nolo.chat",
|
|
374
|
-
message: "hello",
|
|
375
|
-
continueDialogId: " dialog-existing ",
|
|
376
|
-
inheritedFromDialogKey: "dialog-user-1-dialog-2",
|
|
377
|
-
parentDialogId: "dialog-2",
|
|
378
|
-
scriptDir: "C:/missing/scripts",
|
|
379
|
-
env: { AUTH_TOKEN: "token-123" },
|
|
380
|
-
output,
|
|
381
|
-
runtimeMode: "server",
|
|
382
|
-
scriptPathExists: () => false,
|
|
383
|
-
fetchImpl: async (_url, init) => {
|
|
384
|
-
requests.push({ body: JSON.parse(String(init?.body)) });
|
|
385
|
-
return Response.json({ content: "ok", dialogId: "dialog-1" });
|
|
386
|
-
},
|
|
387
|
-
});
|
|
388
|
-
|
|
389
|
-
expect(requests[0]?.body).toMatchObject({
|
|
390
|
-
continueDialogId: "dialog-existing",
|
|
391
|
-
});
|
|
392
|
-
expect(requests[0]?.body).not.toHaveProperty("inheritedFromDialogKey");
|
|
393
|
-
expect(requests[0]?.body).not.toHaveProperty("parentDialogId");
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
test("treats blank continueDialogId as absent for HTTP runs", async () => {
|
|
397
|
-
const output = new CaptureOutput();
|
|
398
|
-
const requests: Array<{ body: any }> = [];
|
|
399
|
-
|
|
400
|
-
await runAgentTurn({
|
|
401
|
-
agentName: "nolo",
|
|
402
|
-
agentKey: "agent-pub-test",
|
|
403
|
-
serverUrl: "https://nolo.chat",
|
|
404
|
-
message: "hello",
|
|
405
|
-
continueDialogId: " ",
|
|
406
|
-
inheritedFromDialogKey: "dialog-user-1-dialog-2",
|
|
407
|
-
parentDialogId: "dialog-2",
|
|
408
|
-
scriptDir: "C:/missing/scripts",
|
|
409
|
-
env: { AUTH_TOKEN: "token-123" },
|
|
410
|
-
output,
|
|
411
|
-
runtimeMode: "server",
|
|
412
|
-
scriptPathExists: () => false,
|
|
413
|
-
fetchImpl: async (_url, init) => {
|
|
414
|
-
requests.push({ body: JSON.parse(String(init?.body)) });
|
|
415
|
-
return Response.json({ content: "ok", dialogId: "dialog-1" });
|
|
416
|
-
},
|
|
417
|
-
});
|
|
418
|
-
|
|
419
|
-
expect(requests[0]?.body).not.toHaveProperty("continueDialogId");
|
|
420
|
-
expect(requests[0]?.body).toMatchObject({
|
|
421
|
-
inheritedFromDialogKey: "dialog-user-1-dialog-2",
|
|
422
|
-
parentDialogId: "dialog-2",
|
|
423
|
-
});
|
|
424
|
-
});
|
|
425
|
-
|
|
426
252
|
test("records background task-run handoff as running instead of completed", async () => {
|
|
427
253
|
const output = new CaptureOutput();
|
|
428
254
|
const writebacks: any[] = [];
|
|
@@ -1040,7 +866,7 @@ describe("cli agent run client", () => {
|
|
|
1040
866
|
expect(output.text()).toContain("queryTableRows, taskRun");
|
|
1041
867
|
});
|
|
1042
868
|
|
|
1043
|
-
test("auto mode
|
|
869
|
+
test("auto mode skips known platform agents when local config cannot be read", async () => {
|
|
1044
870
|
const output = new CaptureOutput();
|
|
1045
871
|
const httpCalls: Array<{ url: string; body: any }> = [];
|
|
1046
872
|
|
|
@@ -1082,7 +908,7 @@ describe("cli agent run client", () => {
|
|
|
1082
908
|
expect(result).toEqual({ exitCode: 0, dialogId: "dialog-server" });
|
|
1083
909
|
expect(httpCalls).toHaveLength(1);
|
|
1084
910
|
expect(httpCalls[0]?.body.agentKey).toBe(NOLO_PROJECT_MANAGER_AGENT_KEY);
|
|
1085
|
-
expect(output.text()).toContain("
|
|
911
|
+
expect(output.text()).toContain("known platform agent");
|
|
1086
912
|
expect(output.text()).toContain("nolo-project-manager -> working");
|
|
1087
913
|
expect(output.text()).toContain("nolo-project-manager > server ok");
|
|
1088
914
|
});
|
|
@@ -1238,8 +1064,8 @@ describe("cli agent run client", () => {
|
|
|
1238
1064
|
expect(output.text()).toContain("Set AUTH_TOKEN");
|
|
1239
1065
|
});
|
|
1240
1066
|
|
|
1241
|
-
test("prints a friendly connection hint instead of crashing on transport errors", async () => {
|
|
1242
|
-
const output = new CaptureOutput();
|
|
1067
|
+
test("prints a friendly connection hint instead of crashing on transport errors", async () => {
|
|
1068
|
+
const output = new CaptureOutput();
|
|
1243
1069
|
|
|
1244
1070
|
const result = await runAgentTurn({
|
|
1245
1071
|
agentName: "nolo",
|
|
@@ -1255,30 +1081,8 @@ describe("cli agent run client", () => {
|
|
|
1255
1081
|
},
|
|
1256
1082
|
});
|
|
1257
1083
|
|
|
1258
|
-
expect(result).toEqual({ exitCode: 1 });
|
|
1259
|
-
expect(output.text()).toContain("Could not reach http://127.0.0.1:38123/api/agent/run");
|
|
1260
|
-
expect(output.text()).toContain("set NOLO_SERVER");
|
|
1261
|
-
});
|
|
1262
|
-
|
|
1263
|
-
test("mentions sandboxed network isolation for remote transport failures", async () => {
|
|
1264
|
-
const output = new CaptureOutput();
|
|
1265
|
-
|
|
1266
|
-
const result = await runAgentTurn({
|
|
1267
|
-
agentName: "nolo",
|
|
1268
|
-
agentKey: "agent-pub-test",
|
|
1269
|
-
serverUrl: "https://nolo.chat",
|
|
1270
|
-
message: "hello",
|
|
1271
|
-
scriptDir: "C:/missing/scripts",
|
|
1272
|
-
env: { AUTH_TOKEN: "token-123" },
|
|
1273
|
-
output,
|
|
1274
|
-
scriptPathExists: () => false,
|
|
1275
|
-
fetchImpl: async () => {
|
|
1276
|
-
throw new TypeError("Unable to connect. Is the computer able to access the url?");
|
|
1277
|
-
},
|
|
1278
|
-
});
|
|
1279
|
-
|
|
1280
|
-
expect(result).toEqual({ exitCode: 1 });
|
|
1281
|
-
expect(output.text()).toContain("sandboxed agent session");
|
|
1282
|
-
expect(output.text()).toContain("host machine can reach the server");
|
|
1283
|
-
});
|
|
1284
|
-
});
|
|
1084
|
+
expect(result).toEqual({ exitCode: 1 });
|
|
1085
|
+
expect(output.text()).toContain("Could not reach http://127.0.0.1:38123/api/agent/run");
|
|
1086
|
+
expect(output.text()).toContain("set NOLO_SERVER");
|
|
1087
|
+
});
|
|
1088
|
+
});
|