nolo-cli 0.141.0-alpha.1 → 0.141.0-alpha.2

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.
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  generateCloudflareEmailRoutingToken,
3
3
  upsertEnvVariable
4
- } from "./chunk-DLT3R4CA.js";
4
+ } from "./chunk-ATXCJGRN.js";
5
5
  import {
6
6
  runAgentCreateCommand
7
- } from "./chunk-K7ASQNHP.js";
7
+ } from "./chunk-X45MLRN4.js";
8
8
  import "./chunk-U4STABYN.js";
9
9
  import {
10
10
  positionalArgs,
11
11
  readFlagValue
12
12
  } from "./chunk-BIDGLJQ3.js";
13
- import "./chunk-5VI55RD6.js";
14
- import "./chunk-RDIYKQKZ.js";
13
+ import "./chunk-SFRMB7XN.js";
14
+ import "./chunk-W5UYXCQE.js";
15
15
  import "./chunk-OY5IJI2N.js";
16
16
  import "./chunk-62IL3KQV.js";
17
17
  import {
@@ -92,7 +92,7 @@ async function defaultExecuteCli(provider, prompt, options) {
92
92
  return executeCli(provider, prompt, options);
93
93
  }
94
94
  async function forwardConnectorRunMessage(machine, message, pushMessage, executeCli, env, fetchImpl) {
95
- const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-VI2S5AUR.js");
95
+ const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-4DWFWYZ6.js");
96
96
  return handleConnectorRunMessage(message, pushMessage, executeCli, env, fetchImpl);
97
97
  }
98
98
  async function detectLaunchableMachineInfo() {
@@ -2,10 +2,10 @@ import {
2
2
  runAgentCreateCommand,
3
3
  runAgentReadCommand,
4
4
  runAgentUpdateCommand
5
- } from "./chunk-K7ASQNHP.js";
5
+ } from "./chunk-X45MLRN4.js";
6
6
  import "./chunk-U4STABYN.js";
7
- import "./chunk-5VI55RD6.js";
8
- import "./chunk-RDIYKQKZ.js";
7
+ import "./chunk-SFRMB7XN.js";
8
+ import "./chunk-W5UYXCQE.js";
9
9
  import "./chunk-OY5IJI2N.js";
10
10
  import "./chunk-62IL3KQV.js";
11
11
  import "./chunk-CTUQJVQM.js";
@@ -8,13 +8,13 @@ import {
8
8
  resolveRunSettlementNote,
9
9
  resolveWorkflowReference,
10
10
  runAgentRunCommand
11
- } from "./chunk-AYLMRAUA.js";
11
+ } from "./chunk-BWSBFGQN.js";
12
12
  import "./chunk-VJVNU77E.js";
13
13
  import {
14
14
  parseAgentRunArgs
15
15
  } from "./chunk-BIDGLJQ3.js";
16
- import "./chunk-5VI55RD6.js";
17
- import "./chunk-RDIYKQKZ.js";
16
+ import "./chunk-SFRMB7XN.js";
17
+ import "./chunk-W5UYXCQE.js";
18
18
  import "./chunk-OY5IJI2N.js";
19
19
  import "./chunk-62IL3KQV.js";
20
20
  import "./chunk-CTUQJVQM.js";
@@ -3,7 +3,7 @@ import {
3
3
  parseFlagWithOptionalValue,
4
4
  runCloudflareOAuthLogin,
5
5
  upsertEnvVariable
6
- } from "./chunk-DLT3R4CA.js";
6
+ } from "./chunk-ATXCJGRN.js";
7
7
  import {
8
8
  ANTHROPIC_OAUTH_AUTHORIZE_URL,
9
9
  ANTHROPIC_OAUTH_CALLBACK_PORT,
@@ -44,7 +44,7 @@ import {
44
44
  startCallbackServer,
45
45
  validateXAIEndpoint,
46
46
  xaiOAuthDiscovery
47
- } from "./chunk-RDIYKQKZ.js";
47
+ } from "./chunk-W5UYXCQE.js";
48
48
  import {
49
49
  defaultOpenBrowser
50
50
  } from "./chunk-VPFEPRME.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-5VI55RD6.js";
4
+ } from "./chunk-SFRMB7XN.js";
5
5
  import {
6
6
  clipMultilineText
7
7
  } from "./chunk-MPRDXX4T.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generatePkcePair,
3
3
  startCallbackServer
4
- } from "./chunk-RDIYKQKZ.js";
4
+ } from "./chunk-W5UYXCQE.js";
5
5
  import {
6
6
  toErrorMessage
7
7
  } from "./chunk-HNMXYYJR.js";
@@ -28,7 +28,7 @@ import {
28
28
  t,
29
29
  toolLabel,
30
30
  toolLabelVariants
31
- } from "./chunk-5VI55RD6.js";
31
+ } from "./chunk-SFRMB7XN.js";
32
32
  import {
33
33
  clearCredentialAvailability,
34
34
  readCredentialEntry,
@@ -4,7 +4,7 @@ import {
4
4
  refreshAntigravityOAuthToken,
5
5
  refreshOpenAiCodexToken,
6
6
  xaiRefresh
7
- } from "./chunk-RDIYKQKZ.js";
7
+ } from "./chunk-W5UYXCQE.js";
8
8
  import {
9
9
  createChromeConnectorClient,
10
10
  createVerifiedChromeConnectorClient,
@@ -368,9 +368,19 @@ async function refreshAntigravityOAuthToken(credential, deps = {}) {
368
368
  import { createHash as createHash2 } from "node:crypto";
369
369
 
370
370
  // packages/agent-runtime/oauthRefreshError.ts
371
- var PERMANENT_REFRESH_CODES = /* @__PURE__ */ new Set(["invalid_grant", "refresh_token_reused", "invalid_client"]);
371
+ var PERMANENT_REFRESH_CODES = /* @__PURE__ */ new Set([
372
+ "invalid_grant",
373
+ // OpenAI 令牌端点对失效/不存在的 refresh token 返回 401
374
+ // {"error":{"code":"invalid_refresh_token",...}}(2026-10-01 用必然无效的
375
+ // token 实测)。线上 chatgpt 凭据正是因为没认出它,被当成临时的
376
+ // "unauthorized"、每 15 分钟重试一次且永远不提示重新授权。
377
+ "invalid_refresh_token",
378
+ "refresh_token_reused",
379
+ "invalid_client"
380
+ ]);
372
381
  var SAFE_MESSAGES = {
373
382
  invalid_grant: "refresh token \u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u6388\u6743",
383
+ invalid_refresh_token: "refresh token \u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u6388\u6743",
374
384
  refresh_token_reused: "refresh token \u5DF2\u88AB\u5176\u4ED6\u526F\u672C\u4F7F\u7528\uFF0C\u8BF7\u91CD\u65B0\u6388\u6743",
375
385
  invalid_client: "OAuth \u5BA2\u6237\u7AEF\u88AB\u62D2\u7EDD\uFF0C\u8BF7\u91CD\u65B0\u6388\u6743",
376
386
  unauthorized: "\u4E0A\u6E38\u62D2\u7EDD\u4E86\u5237\u65B0\u8BF7\u6C42\uFF08401/403\uFF09",
@@ -408,6 +418,9 @@ function readErrorCode(payload) {
408
418
  function classifyOAuthRefreshHttpFailure(status, payload, headers) {
409
419
  const raw = readErrorCode(payload)?.toLowerCase();
410
420
  if (raw === "invalid_grant") return new OAuthRefreshError("invalid_grant", { status });
421
+ if (raw === "invalid_refresh_token") {
422
+ return new OAuthRefreshError("invalid_refresh_token", { status });
423
+ }
411
424
  if (raw === "refresh_token_reused") {
412
425
  return new OAuthRefreshError("refresh_token_reused", { status });
413
426
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-U4STABYN.js";
4
4
  import {
5
5
  clearCliLocalRuntimePreparedAgentCache
6
- } from "./chunk-5VI55RD6.js";
6
+ } from "./chunk-SFRMB7XN.js";
7
7
  import {
8
8
  getReadableCliDb
9
9
  } from "./chunk-CTUQJVQM.js";
@@ -103,7 +103,7 @@ function createDaemonShortcutCommand(path, description, command) {
103
103
  // packages/cli/agentInternalCommandEntries.ts
104
104
  function getAgentInternalCommandEntries() {
105
105
  const createAgentRunCommand = (path, description) => createContextCommand(path, description, async (args, ctx) => {
106
- const { runAgentRunCommand } = await import("./agentRunCommand-3JJVJWKN.js");
106
+ const { runAgentRunCommand } = await import("./agentRunCommand-QXC6SUES.js");
107
107
  return runAgentRunCommand(args, {
108
108
  env: ctx.env,
109
109
  scriptDir: ctx.scriptDir,
@@ -119,7 +119,7 @@ function getAgentInternalCommandEntries() {
119
119
  return runAgentListCommand(args, deps);
120
120
  }),
121
121
  createEnvCommand(["agent", "create"], "Create a new agent", async (args, deps) => {
122
- const { runAgentCreateCommand } = await import("./agentRecordCommands-PBAKB3YI.js");
122
+ const { runAgentCreateCommand } = await import("./agentRecordCommands-EF4O73ZD.js");
123
123
  return runAgentCreateCommand(args, deps);
124
124
  }),
125
125
  createEnvCommand(["agent", "models"], "List models available on an OpenAI-compatible provider", async (args, deps) => {
@@ -135,7 +135,7 @@ function getAgentInternalCommandEntries() {
135
135
  return runAgentPullCommand(args, deps);
136
136
  }),
137
137
  createEnvCommand(["agent", "read"], "Read a single agent", async (args, deps) => {
138
- const { runAgentReadCommand } = await import("./agentRecordCommands-PBAKB3YI.js");
138
+ const { runAgentReadCommand } = await import("./agentRecordCommands-EF4O73ZD.js");
139
139
  return runAgentReadCommand(args, deps);
140
140
  }),
141
141
  createAgentRunCommand(["agent", "run"], "Run an agent"),
@@ -164,26 +164,26 @@ function getAgentInternalCommandEntries() {
164
164
  return runSetupOfflineMarxistsAgentCommand(args, deps);
165
165
  }),
166
166
  createEnvCommand(["agent", "update"], "Update agent fields", async (args, deps) => {
167
- const { runAgentUpdateCommand } = await import("./agentRecordCommands-PBAKB3YI.js");
167
+ const { runAgentUpdateCommand } = await import("./agentRecordCommands-EF4O73ZD.js");
168
168
  return runAgentUpdateCommand(args, deps);
169
169
  }),
170
170
  createEnvCommand(["agent", "email", "provision"], "Provision a controlled inbox for an agent", async (args, deps) => {
171
- const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-XCFMV73Q.js");
171
+ const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-COB4Z4JG.js");
172
172
  return runAgentEmailProvisionCommand(args, deps);
173
173
  }),
174
174
  createEnvCommand(["agent", "email", "bind"], "Bind an existing email address to an agent", async (args, deps) => {
175
- const { runAgentEmailBindCommand } = await import("./agentEmailCommands-XCFMV73Q.js");
175
+ const { runAgentEmailBindCommand } = await import("./agentEmailCommands-COB4Z4JG.js");
176
176
  return runAgentEmailBindCommand(args, deps);
177
177
  }),
178
178
  createEnvCommand(["agent", "email", "transfer"], "Transfer an email identity from one agent to another (cross-account)", async (args, deps) => {
179
- const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-XCFMV73Q.js");
179
+ const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-COB4Z4JG.js");
180
180
  return runAgentEmailTransferCommand(args, deps);
181
181
  }),
182
182
  createEnvCommand(
183
183
  ["agent", "email", "create-and-provision"],
184
184
  "Create an agent and provision its controlled inbox",
185
185
  async (args, deps) => {
186
- const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-XCFMV73Q.js");
186
+ const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-COB4Z4JG.js");
187
187
  return runAgentEmailCreateAndProvisionCommand(args, deps);
188
188
  }
189
189
  ),
@@ -204,15 +204,15 @@ function getAgentInternalCommandEntries() {
204
204
  return runAgentRevokeGrantCommand(args, deps);
205
205
  }),
206
206
  createEnvCommand(["agent", "bind-current"], "Bind an agent to this machine", async (args, deps) => {
207
- const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-VDT575S6.js");
207
+ const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-N5TMIAPZ.js");
208
208
  return runAgentBindCurrentCommand(args, deps);
209
209
  }),
210
210
  createEnvCommand(["agent", "smoke-current"], "Smoke test a bound agent through this machine", async (args, deps) => {
211
- const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-VDT575S6.js");
211
+ const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-N5TMIAPZ.js");
212
212
  return runAgentSmokeCurrentCommand(args, deps);
213
213
  }),
214
214
  createEnvCommand(["agent", "runtime-doctor"], "Diagnose current machine runtime compatibility", async (args, deps) => {
215
- const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-VDT575S6.js");
215
+ const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-N5TMIAPZ.js");
216
216
  return runAgentRuntimeDoctorCommand(args, deps);
217
217
  }),
218
218
  createAgentRunCommand(["agent", "chat"], "Chat with an agent")
@@ -424,31 +424,31 @@ function getSystemInternalCommandEntries(renderHelpText2) {
424
424
  return runAuthCooldownCommand(_args, ctx.env);
425
425
  }),
426
426
  createArgsCommand(["auth", "cloudflare"], "Authorize Cloudflare OAuth", async (args) => {
427
- const { runAuthCloudflareCommand } = await import("./authCommand-VLT5WAYD.js");
427
+ const { runAuthCloudflareCommand } = await import("./authCommand-CYPLLWIC.js");
428
428
  return runAuthCloudflareCommand(args);
429
429
  }),
430
430
  createArgsCommand(["auth", "chatgpt"], "Authorize ChatGPT / OpenAI Codex OAuth", async (args) => {
431
- const { runAuthChatgptCommand } = await import("./authCommand-VLT5WAYD.js");
431
+ const { runAuthChatgptCommand } = await import("./authCommand-CYPLLWIC.js");
432
432
  return runAuthChatgptCommand(args);
433
433
  }),
434
434
  createArgsCommand(["auth", "xai"], "Authorize xAI Grok OAuth (SuperGrok subscription)", async (args) => {
435
- const { runAuthXaiCommand } = await import("./authCommand-VLT5WAYD.js");
435
+ const { runAuthXaiCommand } = await import("./authCommand-CYPLLWIC.js");
436
436
  return runAuthXaiCommand(args);
437
437
  }),
438
438
  createArgsCommand(["auth", "antigravity"], "Authorize Google Antigravity OAuth", async (args) => {
439
- const { runAuthAntigravityCommand } = await import("./authCommand-VLT5WAYD.js");
439
+ const { runAuthAntigravityCommand } = await import("./authCommand-CYPLLWIC.js");
440
440
  return runAuthAntigravityCommand(args);
441
441
  }),
442
442
  createArgsCommand(["auth", "claude"], "Authorize Claude Pro/Max OAuth", async (args) => {
443
- const { runAuthClaudeCommand } = await import("./authCommand-VLT5WAYD.js");
443
+ const { runAuthClaudeCommand } = await import("./authCommand-CYPLLWIC.js");
444
444
  return runAuthClaudeCommand(args);
445
445
  }),
446
446
  createArgsCommand(["auth", "cursor"], "Authorize Cursor Pro OAuth", async (args) => {
447
- const { runAuthCursorCommand } = await import("./authCommand-VLT5WAYD.js");
447
+ const { runAuthCursorCommand } = await import("./authCommand-CYPLLWIC.js");
448
448
  return runAuthCursorCommand(args);
449
449
  }),
450
450
  createArgsCommand(["auth", "devin"], "Authorize Devin OAuth (Free SWE-2)", async (args) => {
451
- const { runAuthDevinCommand } = await import("./authCommand-VLT5WAYD.js");
451
+ const { runAuthDevinCommand } = await import("./authCommand-CYPLLWIC.js");
452
452
  return runAuthDevinCommand(args);
453
453
  }),
454
454
  createArgsCommand(["login"], "Log in to Nolo", async (args) => {
@@ -464,15 +464,15 @@ function getSystemInternalCommandEntries(renderHelpText2) {
464
464
  return runWhoamiCommand({ args, env: ctx.env });
465
465
  }),
466
466
  createEntrypointEnvCommand(["connect"], "Send machine heartbeats or hold a connector websocket", async (args, deps) => {
467
- const { runMachineConnectCommand } = await import("./machineCommands-DXVYZM4A.js");
467
+ const { runMachineConnectCommand } = await import("./machineCommands-Y5QYMVTJ.js");
468
468
  return runMachineConnectCommand(args, deps);
469
469
  }),
470
470
  createDaemonShortcutCommand(["daemon"], "Run the connector daemon shortcut", async (args, deps) => {
471
- const { runMachineConnectCommand } = await import("./machineCommands-DXVYZM4A.js");
471
+ const { runMachineConnectCommand } = await import("./machineCommands-Y5QYMVTJ.js");
472
472
  return runMachineConnectCommand(args, deps);
473
473
  }),
474
474
  createEnvCommand(["machine", "status"], "List machines registered to the current profile", async (args, deps) => {
475
- const { runMachineStatusCommand } = await import("./machineCommands-DXVYZM4A.js");
475
+ const { runMachineStatusCommand } = await import("./machineCommands-Y5QYMVTJ.js");
476
476
  return runMachineStatusCommand(args, deps);
477
477
  }),
478
478
  createEnvCommand(["doctor", "runtime"], "Diagnose local-first agent runtime selection", async (args, deps) => {
package/index.js CHANGED
@@ -71,7 +71,7 @@ async function runScript(script, forwardedArgs, env) {
71
71
  return proc.exited;
72
72
  }
73
73
  async function launchTuiWorkspace(args2) {
74
- const { startTuiWorkspace } = await import("./readlineWorkspace-YSDOBOSD.js");
74
+ const { startTuiWorkspace } = await import("./readlineWorkspace-YHJMMTC7.js");
75
75
  const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-7KLLDP22.js");
76
76
  return startTuiWorkspace({
77
77
  ...args2,
@@ -81,7 +81,7 @@ async function launchTuiWorkspace(args2) {
81
81
  });
82
82
  }
83
83
  async function main() {
84
- const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-RF5DRRAH.js");
84
+ const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-2RDTD6CT.js");
85
85
  const { buildCliRuntimeEnv, loadProfileConfig } = await import("./profileConfig-ZGOFORWV.js");
86
86
  const { resolveTuiLaunchMode } = await import("./runtimeModeArgs-2Y7BALTO.js");
87
87
  const runtimeEnv = {
@@ -2,14 +2,14 @@ import {
2
2
  buildMachinePermissionPromptBlock,
3
3
  handleConnectorRunMessage,
4
4
  resolveMachineRunPermissionPolicy
5
- } from "./chunk-GYB5AS4J.js";
5
+ } from "./chunk-A3OTEZGZ.js";
6
6
  import {
7
7
  isConnectorWebSocketAuthError,
8
8
  isConnectorWebSocketRetryableError,
9
9
  resolveConnectorWebSocketTarget
10
10
  } from "./chunk-ALXHV7NK.js";
11
- import "./chunk-5VI55RD6.js";
12
- import "./chunk-RDIYKQKZ.js";
11
+ import "./chunk-SFRMB7XN.js";
12
+ import "./chunk-W5UYXCQE.js";
13
13
  import "./chunk-OY5IJI2N.js";
14
14
  import "./chunk-62IL3KQV.js";
15
15
  import {
@@ -11,9 +11,9 @@ import {
11
11
  runtimeWorkspacePermissionPolicy,
12
12
  scopePermissionPolicyToRuntimeWorkspace,
13
13
  summarizeAgentConfigForLogs
14
- } from "./chunk-GYB5AS4J.js";
15
- import "./chunk-5VI55RD6.js";
16
- import "./chunk-RDIYKQKZ.js";
14
+ } from "./chunk-A3OTEZGZ.js";
15
+ import "./chunk-SFRMB7XN.js";
16
+ import "./chunk-W5UYXCQE.js";
17
17
  import "./chunk-OY5IJI2N.js";
18
18
  import "./chunk-62IL3KQV.js";
19
19
  import "./chunk-EADNWBAZ.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolo-cli",
3
- "version": "0.141.0-alpha.1",
3
+ "version": "0.141.0-alpha.2",
4
4
  "type": "module",
5
5
  "description": "Agent-first terminal workspace for Nolo",
6
6
  "bin": {
@@ -73,7 +73,7 @@ import {
73
73
  wrapTextToLines,
74
74
  wrapTranscriptLine,
75
75
  wrapTranscriptLineWithLayout
76
- } from "./chunk-AYLMRAUA.js";
76
+ } from "./chunk-BWSBFGQN.js";
77
77
  import "./chunk-VJVNU77E.js";
78
78
  import "./chunk-BIDGLJQ3.js";
79
79
  import {
@@ -85,8 +85,8 @@ import {
85
85
  readTimestamp,
86
86
  setCliLocale,
87
87
  t
88
- } from "./chunk-5VI55RD6.js";
89
- import "./chunk-RDIYKQKZ.js";
88
+ } from "./chunk-SFRMB7XN.js";
89
+ import "./chunk-W5UYXCQE.js";
90
90
  import "./chunk-OY5IJI2N.js";
91
91
  import "./chunk-62IL3KQV.js";
92
92
  import {