nolo-cli 0.1.32 → 0.1.33

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.
Files changed (230) hide show
  1. package/README.md +0 -6
  2. package/agent-runtime/agentRecordConfig.ts +2 -0
  3. package/agent-runtime/hostAdapter.ts +1 -0
  4. package/agent-runtime/index.ts +0 -21
  5. package/agent-runtime/localToolPolicy.ts +6 -13
  6. package/agent-runtime/localWorkspaceTools.ts +30 -333
  7. package/agent-runtime/platformChatProvider.ts +1 -4
  8. package/agent-runtime/runtimeToolPolicy.ts +47 -32
  9. package/agentAliases.ts +14 -83
  10. package/agentCommandSupport.ts +3 -6
  11. package/agentInternalCommandEntries.ts +2 -13
  12. package/agentListCommands.ts +19 -28
  13. package/agentMachineCommands.ts +40 -336
  14. package/agentPullCommand.ts +36 -56
  15. package/agentRecordCommands.ts +3 -5
  16. package/agentRecordHelpers.ts +22 -189
  17. package/agentRunCommand.ts +438 -107
  18. package/agentRuntimeLocal.ts +0 -10
  19. package/ai/agent/cliExecutor.ts +19 -323
  20. package/authCommands.ts +2 -36
  21. package/cli/agentAliases.ts +14 -83
  22. package/cli/agentCommandSupport.ts +3 -6
  23. package/cli/agentInternalCommandEntries.ts +2 -13
  24. package/cli/agentListCommands.ts +19 -28
  25. package/cli/agentMachineCommands.ts +40 -336
  26. package/cli/agentPullCommand.ts +36 -56
  27. package/cli/agentRecordCommands.ts +3 -5
  28. package/cli/agentRecordHelpers.ts +22 -189
  29. package/cli/agentRunCommand.ts +438 -107
  30. package/cli/agentRuntimeLocal.ts +0 -10
  31. package/cli/authCommands.ts +2 -36
  32. package/cli/cliEnvHelpers.ts +21 -162
  33. package/cli/client/agentRun.ts +853 -57
  34. package/cli/client/localRuntimeAdapter.ts +22 -159
  35. package/cli/client/streamingOutput.ts +3 -1
  36. package/cli/client/taskRunPrompt.ts +24 -7
  37. package/cli/commandRegistry.ts +2 -3
  38. package/cli/connectorRunArtifact.ts +10 -34
  39. package/cli/connectorWebSocketTarget.ts +6 -10
  40. package/cli/internalCommandEntries.ts +0 -8
  41. package/cli/localRuntimeDb.ts +2 -39
  42. package/cli/machineCommands.ts +189 -190
  43. package/cli/machineDaemonCommands.ts +165 -9
  44. package/cli/machineHeartbeatCommands.ts +2 -1
  45. package/cli/machineStatusCommands.ts +13 -5
  46. package/cli/machineWatchCommands.ts +1 -1
  47. package/cli/machineWsRunDispatch.ts +14 -48
  48. package/cli/machineWsSession.ts +0 -2
  49. package/cli/offlineMarxistsAgentCommand.ts +314 -0
  50. package/cli/runtimeDoctorCommands.ts +69 -18
  51. package/cli/scriptCommandEntries.ts +45 -5
  52. package/cli/tableCommands.ts +133 -33
  53. package/cli/taskRunCommand.ts +211 -16
  54. package/cli/tui/session.ts +372 -43
  55. package/cli/workflowInternalCommandEntries.ts +0 -20
  56. package/cliEnvHelpers.ts +21 -162
  57. package/client/agentConfigResolver.test.ts +2 -0
  58. package/client/agentRun.test.ts +12 -208
  59. package/client/agentRun.ts +853 -57
  60. package/client/localRuntimeAdapter.test.ts +9 -168
  61. package/client/localRuntimeAdapter.ts +22 -159
  62. package/client/localToolPolicy.test.ts +4 -28
  63. package/client/streamingOutput.ts +3 -1
  64. package/client/taskRunPrompt.ts +24 -7
  65. package/commandRegistry.ts +2 -3
  66. package/connectorRunArtifact.ts +10 -34
  67. package/connectorWebSocketTarget.ts +6 -10
  68. package/database/server/db.ts +34 -15
  69. package/internalCommandEntries.ts +0 -8
  70. package/localRuntimeDb.ts +2 -39
  71. package/machineCommands.ts +189 -190
  72. package/machineDaemonCommands.ts +165 -9
  73. package/machineHeartbeatCommands.ts +2 -1
  74. package/machineStatusCommands.ts +13 -5
  75. package/machineWatchCommands.ts +1 -1
  76. package/machineWsRunDispatch.ts +14 -48
  77. package/machineWsSession.ts +0 -2
  78. package/offlineMarxistsAgentCommand.ts +314 -0
  79. package/package.json +49 -193
  80. package/runtimeDoctorCommands.ts +69 -18
  81. package/scriptCommandEntries.ts +45 -5
  82. package/tableCommands.ts +133 -33
  83. package/taskRunCommand.ts +211 -16
  84. package/tui/session.ts +372 -43
  85. package/workflowInternalCommandEntries.ts +0 -20
  86. package/agent-runtime/dialogStatus.ts +0 -139
  87. package/agent-runtime/hostRuntimeConfig.ts +0 -86
  88. package/agentCreateCustomCommands.ts +0 -278
  89. package/agentDialogsCommands.ts +0 -227
  90. package/agentDoctorCommands.ts +0 -203
  91. package/agentRunLocalWorkspace.ts +0 -182
  92. package/agentRunParsing.ts +0 -298
  93. package/agentSuperviseCommands.ts +0 -8
  94. package/agentUnpublishCommands.ts +0 -113
  95. package/ai/agent/agentRunDialogLineage.ts +0 -56
  96. package/ai/policy/types.ts +0 -64
  97. package/ai/skills/skillSummaryMarker.ts +0 -26
  98. package/app/types.ts +0 -358
  99. package/build.ts +0 -16
  100. package/buildPublish.ts +0 -138
  101. package/buildPublishArtifactAssembly.ts +0 -724
  102. package/buildPublishImportAnalysis.ts +0 -242
  103. package/chat/messages/fetchMessages.ts +0 -84
  104. package/chat/messages/types.ts +0 -185
  105. package/cli/agentCreateCustomCommands.ts +0 -278
  106. package/cli/agentDialogsCommands.ts +0 -227
  107. package/cli/agentDoctorCommands.ts +0 -203
  108. package/cli/agentRunLocalWorkspace.ts +0 -182
  109. package/cli/agentRunParsing.ts +0 -298
  110. package/cli/agentSuperviseCommands.ts +0 -8
  111. package/cli/agentUnpublishCommands.ts +0 -113
  112. package/cli/buildPublish.ts +0 -138
  113. package/cli/buildPublishArtifactAssembly.ts +0 -724
  114. package/cli/buildPublishImportAnalysis.ts +0 -242
  115. package/cli/cliIoTypes.ts +0 -3
  116. package/cli/cliRuntimeDoctorReport.ts +0 -193
  117. package/cli/client/agentRunInput.ts +0 -10
  118. package/cli/client/agentRunLocalExecution.ts +0 -124
  119. package/cli/client/agentRunLocalExecutor.ts +0 -179
  120. package/cli/client/agentRunRuntimeSelection.ts +0 -145
  121. package/cli/client/agentRunServerTransport.ts +0 -397
  122. package/cli/client/agentRunTaskRunRecorder.ts +0 -176
  123. package/cli/customCodingAgentFlow.ts +0 -208
  124. package/cli/customCodingAgentRecord.ts +0 -179
  125. package/cli/dialogDataAccess.ts +0 -186
  126. package/cli/dialogInternalCommandEntries.ts +0 -11
  127. package/cli/dialogReadCommands.ts +0 -180
  128. package/cli/dialogReadHelpers.ts +0 -226
  129. package/cli/dialogStatusCommands.ts +0 -123
  130. package/cli/docInternalCommandEntries.ts +0 -20
  131. package/cli/hybridReadHelpers.ts +0 -109
  132. package/cli/machineCommandPrompts.ts +0 -79
  133. package/cli/machineCommandResolution.ts +0 -43
  134. package/cli/noloReadBridgePrompt.ts +0 -16
  135. package/cli/pageCreateCommands.ts +0 -219
  136. package/cli/pageDeleteCommands.ts +0 -167
  137. package/cli/pageReadCommands.ts +0 -151
  138. package/cli/pageUpdateCommands.ts +0 -249
  139. package/cli/pageWriteHelpers.ts +0 -209
  140. package/cli/publishPackage.ts +0 -36
  141. package/cli/runtimeInternalCommandEntries.ts +0 -15
  142. package/cli/runtimePassthroughCommands.ts +0 -22
  143. package/cli/scriptPassthroughHelpers.ts +0 -28
  144. package/cli/secretScanHelpers.ts +0 -31
  145. package/cli/spaceAttachCommands.ts +0 -134
  146. package/cli/spaceCategoryCommands.ts +0 -263
  147. package/cli/spaceCommands.ts +0 -295
  148. package/cli/spaceDeleteCommands.ts +0 -312
  149. package/cli/spaceInternalCommandEntries.ts +0 -21
  150. package/cli/spaceMutationHelpers.ts +0 -135
  151. package/cli/spaceReadCommands.ts +0 -323
  152. package/cli/tableDataOutput.ts +0 -41
  153. package/cli/tableDataSafety.ts +0 -26
  154. package/cli/tableMetaCommands.ts +0 -307
  155. package/cli/tableMutationCommands.ts +0 -266
  156. package/cli/tableQueryParsing.ts +0 -90
  157. package/cli/tableQueryRequest.ts +0 -53
  158. package/cli/taskRunActions.ts +0 -122
  159. package/cli/taskRunParsing.ts +0 -86
  160. package/cli/taskRunPromptShared.ts +0 -55
  161. package/cli/tui/tuiCatalog.ts +0 -22
  162. package/cli/tui/tuiCommandInterpreter.ts +0 -253
  163. package/cli/tui/tuiPresentation.ts +0 -146
  164. package/cliIoTypes.ts +0 -3
  165. package/cliRuntimeDoctorReport.ts +0 -193
  166. package/client/agentRunInput.ts +0 -10
  167. package/client/agentRunLocalExecution.test.ts +0 -123
  168. package/client/agentRunLocalExecution.ts +0 -124
  169. package/client/agentRunLocalExecutor.ts +0 -179
  170. package/client/agentRunRuntimeSelection.test.ts +0 -159
  171. package/client/agentRunRuntimeSelection.ts +0 -145
  172. package/client/agentRunServerTransport.ts +0 -397
  173. package/client/agentRunTaskRunRecorder.ts +0 -176
  174. package/connector-experimental/daemonLauncher.ts +0 -223
  175. package/create/space/spaceKeys.ts +0 -65
  176. package/create/types.ts +0 -21
  177. package/customCodingAgentFlow.ts +0 -208
  178. package/customCodingAgentRecord.ts +0 -179
  179. package/database/keys.ts +0 -765
  180. package/database/server/authorityStoreTypes.ts +0 -31
  181. package/database/server/legacyServerDb.ts +0 -58
  182. package/database/server/levelAuthorityStore.ts +0 -75
  183. package/database/server/memoryAuthorityStore.ts +0 -133
  184. package/database/server/serverStoreFactory.ts +0 -124
  185. package/database/tombstones.ts +0 -52
  186. package/database/utils/ulid.ts +0 -1
  187. package/dialogDataAccess.ts +0 -186
  188. package/dialogInternalCommandEntries.ts +0 -11
  189. package/dialogReadCommands.ts +0 -180
  190. package/dialogReadHelpers.ts +0 -226
  191. package/dialogStatusCommands.ts +0 -123
  192. package/docInternalCommandEntries.ts +0 -20
  193. package/hybridReadHelpers.ts +0 -109
  194. package/machineCommandPrompts.ts +0 -79
  195. package/machineCommandResolution.ts +0 -43
  196. package/noloReadBridgePrompt.ts +0 -16
  197. package/pageCreateCommands.ts +0 -219
  198. package/pageDeleteCommands.ts +0 -167
  199. package/pageReadCommands.ts +0 -151
  200. package/pageUpdateCommands.ts +0 -249
  201. package/pageWriteHelpers.ts +0 -209
  202. package/publishPackage.ts +0 -36
  203. package/runtimeInternalCommandEntries.ts +0 -15
  204. package/runtimePassthroughCommands.ts +0 -22
  205. package/scriptPassthroughHelpers.ts +0 -28
  206. package/secretScanHelpers.ts +0 -31
  207. package/share/helpers.ts +0 -302
  208. package/share/keys.ts +0 -243
  209. package/share/types.ts +0 -100
  210. package/spaceAttachCommands.ts +0 -134
  211. package/spaceCategoryCommands.ts +0 -263
  212. package/spaceCommands.ts +0 -295
  213. package/spaceDeleteCommands.ts +0 -312
  214. package/spaceInternalCommandEntries.ts +0 -21
  215. package/spaceMutationHelpers.ts +0 -135
  216. package/spaceReadCommands.ts +0 -323
  217. package/tableDataOutput.ts +0 -41
  218. package/tableDataSafety.ts +0 -26
  219. package/tableMetaCommands.ts +0 -307
  220. package/tableMutationCommands.ts +0 -266
  221. package/tableQueryParsing.ts +0 -90
  222. package/tableQueryRequest.ts +0 -53
  223. package/taskRunActions.ts +0 -122
  224. package/taskRunParsing.ts +0 -86
  225. package/taskRunPromptShared.ts +0 -55
  226. package/tui/tuiCatalog.ts +0 -22
  227. package/tui/tuiCommandInterpreter.test.ts +0 -169
  228. package/tui/tuiCommandInterpreter.ts +0 -253
  229. package/tui/tuiPresentation.test.ts +0 -154
  230. package/tui/tuiPresentation.ts +0 -146
@@ -1,14 +1,8 @@
1
1
  import { readFileSync } from "node:fs";
2
- import {
3
- buildPrivateAgentKey,
4
- buildCurrentUserPlatformAgentCandidateKeys,
5
- resolveCliAgentKeyInput,
6
- resolvePlatformAgentAliasSpec,
7
- } from "./agentAliases";
2
+ import { resolveCliAgentKeyInput } from "./agentAliases";
8
3
  import type { CliKvDb } from "./client/hybridRecordStore";
9
4
  import { buildLocalAgentLookupKeys, shouldReadAgentKeyRemotely } from "./client/localAgentRecords";
10
5
  import {
11
- hasExplicitServerOverride,
12
6
  parseUserIdFromAuthToken,
13
7
  readOption,
14
8
  resolveAuthToken,
@@ -16,7 +10,6 @@ import {
16
10
  resolveServerUrl,
17
11
  type EnvLike,
18
12
  } from "./cliEnvHelpers";
19
- import { parseSpaceIdFromInput, readSpaceRecordWithFallback } from "./spaceMutationHelpers";
20
13
 
21
14
  const PROVIDER_COPY_FIELDS = [
22
15
  "apiSource",
@@ -155,13 +148,10 @@ export async function queryUserRecords(args: {
155
148
  fetchImpl: typeof fetch;
156
149
  serverUrl: string;
157
150
  userId: string;
158
- type: "agent" | "cybot" | "dialog";
159
- limit?: number;
151
+ type: "agent" | "cybot";
160
152
  }) {
161
153
  const res = await fetchWithTransportFallback(
162
- `${args.serverUrl}/api/v1/db/query/${encodeURIComponent(args.userId)}${
163
- typeof args.limit === "number" && Number.isFinite(args.limit) ? `?limit=${args.limit}` : ""
164
- }`,
154
+ `${args.serverUrl}/api/v1/db/query/${encodeURIComponent(args.userId)}`,
165
155
  {
166
156
  method: "POST",
167
157
  headers: {
@@ -191,26 +181,6 @@ export async function writeAgentRecord(args: {
191
181
  serverUrl: string;
192
182
  userId: string;
193
183
  record: Record<string, any>;
194
- }) {
195
- return writeDbRecord({
196
- authToken: args.authToken,
197
- dbKey: args.agentKey,
198
- fallbackFetchImpl: args.fallbackFetchImpl,
199
- fetchImpl: args.fetchImpl,
200
- record: args.record,
201
- serverUrl: args.serverUrl,
202
- userId: args.userId,
203
- });
204
- }
205
-
206
- export async function writeDbRecord(args: {
207
- authToken: string;
208
- dbKey: string;
209
- fallbackFetchImpl?: typeof fetch;
210
- fetchImpl: typeof fetch;
211
- serverUrl: string;
212
- userId: string;
213
- record: Record<string, any>;
214
184
  }) {
215
185
  const res = await fetchWithTransportFallback(`${args.serverUrl}/api/v1/db/write/`, {
216
186
  method: "POST",
@@ -219,11 +189,11 @@ export async function writeDbRecord(args: {
219
189
  "Content-Type": "application/json",
220
190
  },
221
191
  body: JSON.stringify({
222
- customKey: args.dbKey,
192
+ customKey: args.agentKey,
223
193
  userId: args.userId,
224
194
  data: {
225
195
  ...args.record,
226
- dbKey: args.dbKey,
196
+ dbKey: args.agentKey,
227
197
  },
228
198
  }),
229
199
  }, args);
@@ -233,145 +203,36 @@ export async function writeDbRecord(args: {
233
203
  }
234
204
  }
235
205
 
236
- export async function deleteDbRecord(args: {
237
- authToken: string;
238
- dbKey: string;
239
- fallbackFetchImpl?: typeof fetch;
240
- fetchImpl: typeof fetch;
241
- serverUrl: string;
242
- userId: string;
243
- }) {
244
- const res = await fetchWithTransportFallback(
245
- `${args.serverUrl}/api/v1/db/delete/${encodeURIComponent(args.dbKey)}?userId=${encodeURIComponent(args.userId)}`,
246
- {
247
- method: "DELETE",
248
- headers: {
249
- Authorization: `Bearer ${args.authToken}`,
250
- },
251
- },
252
- args
253
- );
254
- const text = await res.text();
255
- let data: any = {};
256
- if (text) {
257
- try {
258
- data = JSON.parse(text);
259
- } catch {
260
- data = {};
261
- }
262
- }
263
- if (res.status === 404) return "missing" as const;
264
- if (!res.ok && res.status !== 204) {
265
- throw new Error(`delete failed: HTTP ${res.status} ${JSON.stringify(data)}`);
266
- }
267
- return "deleted" as const;
268
- }
269
-
270
206
  export async function resolveAgentRecordFromHybridStore(args: {
271
207
  agentInput: string;
272
- cliArgs?: string[];
273
208
  env: EnvLike;
274
209
  db: CliKvDb;
275
210
  fetchImpl: typeof fetch;
276
211
  fallbackFetchImpl?: typeof fetch;
277
212
  }) {
278
213
  const agentKey = resolveCliAgentKeyInput(args.agentInput);
279
- const authToken = resolveAuthToken(args.cliArgs ?? [], args.env);
280
- const currentUserId = parseUserIdFromAuthToken(authToken);
281
- const cliArgs = args.cliArgs ?? [];
282
- const defaultServerUrl = resolveServerUrl(cliArgs, args.env);
283
- const serverCandidates = resolveServerCandidates(cliArgs, args.env, defaultServerUrl);
284
- const preferRemote = hasExplicitServerOverride(cliArgs);
285
- const aliasSpec = resolvePlatformAgentAliasSpec(args.agentInput);
286
- const rawSpaceInput = readOption(cliArgs, "--space");
287
- const preferredLookupKeys = buildCurrentUserPlatformAgentCandidateKeys(
288
- args.agentInput,
289
- currentUserId
290
- );
291
- const collectSpaceAttachedCandidateKeys = (spaceRecord: any) => {
292
- const contents = spaceRecord?.contents;
293
- if (!contents || typeof contents !== "object") return [];
294
-
295
- const currentUserPrivateKey =
296
- currentUserId ? buildPrivateAgentKey(currentUserId, aliasSpec!.agentId) : null;
297
- const canonicalMatches: string[] = [];
298
- const otherMatches: string[] = [];
299
- const currentUserMatches: string[] = [];
214
+ const authToken = resolveAuthToken(args.env);
215
+ const defaultServerUrl = resolveServerUrl(args.env);
300
216
 
301
- for (const [entryKey, value] of Object.entries(contents)) {
302
- if (!value || typeof value !== "object") continue;
303
- const contentKey =
304
- typeof (value as any).contentKey === "string" && (value as any).contentKey.trim()
305
- ? (value as any).contentKey.trim()
306
- : entryKey.trim();
307
- if (!contentKey || !contentKey.endsWith(`-${aliasSpec!.agentId}`)) continue;
308
- if (contentKey === aliasSpec!.canonicalKey) {
309
- canonicalMatches.push(contentKey);
310
- continue;
311
- }
312
- if (currentUserPrivateKey && contentKey === currentUserPrivateKey) {
313
- currentUserMatches.push(contentKey);
314
- continue;
315
- }
316
- otherMatches.push(contentKey);
317
- }
318
-
319
- return Array.from(
320
- new Set([
321
- ...canonicalMatches.sort(),
322
- ...otherMatches.sort(),
323
- ...currentUserMatches.sort(),
324
- ])
325
- );
326
- };
327
- const resolveSpaceAttachedCandidateKeys = async () => {
328
- if (!aliasSpec || !rawSpaceInput || !authToken) return [];
217
+ for (const key of buildLocalAgentLookupKeys({
218
+ agentRef: agentKey,
219
+ userId: parseUserIdFromAuthToken(authToken) || "local",
220
+ })) {
329
221
  try {
330
- const spaceId = parseSpaceIdFromInput(rawSpaceInput);
331
- let localSpaceRecord: any = null;
332
- try {
333
- localSpaceRecord = await args.db.get(`space-${spaceId}`);
334
- } catch {
335
- localSpaceRecord = null;
336
- }
337
-
338
- const localMatches = collectSpaceAttachedCandidateKeys(localSpaceRecord);
339
- if (localMatches.length > 0) return localMatches;
340
-
341
- const spaceRecord = await readSpaceRecordWithFallback({
342
- authToken,
343
- db: {
344
- ...args.db,
345
- get: async () => {
346
- throw new Error("force remote refresh for shared space alias resolution");
347
- },
348
- },
349
- fallbackFetchImpl: args.fallbackFetchImpl,
350
- fetchImpl: args.fetchImpl,
351
- serverCandidates,
352
- spaceId,
353
- });
354
- if (spaceRecord && typeof args.db.put === "function") {
355
- await args.db.put(`space-${spaceId}`, spaceRecord);
222
+ const record = await args.db.get(key);
223
+ if (record && typeof record === "object") {
224
+ return {
225
+ agentKey: key,
226
+ record,
227
+ source: record?.serverOrigin ? "remote-cache" : "local-cache",
228
+ } as const;
356
229
  }
357
- return collectSpaceAttachedCandidateKeys(spaceRecord);
358
230
  } catch {
359
- return [];
231
+ // local miss
360
232
  }
361
- };
362
- const spaceAttachedLookupKeys = await resolveSpaceAttachedCandidateKeys();
363
- const lookupKeys =
364
- spaceAttachedLookupKeys.length > 0
365
- ? Array.from(new Set([...spaceAttachedLookupKeys, ...preferredLookupKeys]))
366
- : preferredLookupKeys.length > 0
367
- ? preferredLookupKeys
368
- : buildLocalAgentLookupKeys({
369
- agentRef: agentKey,
370
- userId: currentUserId || "local",
371
- });
372
233
 
373
- const readRemoteRecord = async (key: string) => {
374
- for (const serverUrl of serverCandidates) {
234
+ if (!shouldReadAgentKeyRemotely(key)) continue;
235
+ for (const serverUrl of resolveServerCandidates(args.env, defaultServerUrl)) {
375
236
  try {
376
237
  const remoteRecord = await readAgentRecord({
377
238
  agentKey: key,
@@ -391,31 +252,6 @@ export async function resolveAgentRecordFromHybridStore(args: {
391
252
  // try next
392
253
  }
393
254
  }
394
- return null;
395
- };
396
-
397
- for (const key of lookupKeys) {
398
- if (preferRemote && shouldReadAgentKeyRemotely(key)) {
399
- const remoteFirst = await readRemoteRecord(key);
400
- if (remoteFirst) return remoteFirst;
401
- }
402
-
403
- try {
404
- const record = await args.db.get(key);
405
- if (record && typeof record === "object") {
406
- return {
407
- agentKey: key,
408
- record,
409
- source: record?.serverOrigin ? "remote-cache" : "local-cache",
410
- } as const;
411
- }
412
- } catch {
413
- // local miss
414
- }
415
-
416
- if (!shouldReadAgentKeyRemotely(key)) continue;
417
- const remoteFallback = await readRemoteRecord(key);
418
- if (remoteFallback) return remoteFallback;
419
255
  }
420
256
 
421
257
  return null;
@@ -487,7 +323,6 @@ export function parseAgentUpdateArgs(args: string[]) {
487
323
  }
488
324
 
489
325
  export async function buildUpdatedAgentRecord(args: {
490
- cliArgs?: string[];
491
326
  parsed: NonNullable<ReturnType<typeof parseAgentUpdateArgs>>;
492
327
  env: EnvLike;
493
328
  db: CliKvDb;
@@ -497,14 +332,13 @@ export async function buildUpdatedAgentRecord(args: {
497
332
  }) {
498
333
  const cached = await resolveAgentRecordFromHybridStore({
499
334
  agentInput: args.parsed.agentInput,
500
- cliArgs: args.cliArgs,
501
335
  env: args.env,
502
336
  db: args.db,
503
337
  fetchImpl: args.fetchImpl,
504
338
  fallbackFetchImpl: args.fallbackFetchImpl,
505
339
  });
506
340
  const agentKey = cached?.agentKey ?? resolveCliAgentKeyInput(args.parsed.agentInput);
507
- const serverUrl = cached?.record?.serverOrigin ?? resolveServerUrl(args.cliArgs ?? [], args.env);
341
+ const serverUrl = cached?.record?.serverOrigin ?? resolveServerUrl(args.env);
508
342
  const currentRecord = await readAgentRecord({
509
343
  agentKey,
510
344
  authToken: args.authToken,
@@ -516,7 +350,6 @@ export async function buildUpdatedAgentRecord(args: {
516
350
  if (args.parsed.copyProviderFrom) {
517
351
  const providerSource = await resolveAgentRecordFromHybridStore({
518
352
  agentInput: args.parsed.copyProviderFrom,
519
- cliArgs: args.cliArgs,
520
353
  env: args.env,
521
354
  db: args.db,
522
355
  fetchImpl: args.fetchImpl,