nolo-cli 0.33.0-alpha.17 → 0.33.0-alpha.19

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 (53) hide show
  1. package/{_executeModel-2N36X5OJ.js → _executeModel-XKWVTZAY.js} +11 -11
  2. package/{agentDeleteCommand-HWJXSW6W.js → agentDeleteCommand-ZU4H6F6M.js} +2 -2
  3. package/{agentEmailCommands-VAZMNKEB.js → agentEmailCommands-6ULFXW4A.js} +11 -11
  4. package/{agentListCommands-RTK2KSVM.js → agentListCommands-VN7WCW7Z.js} +2 -2
  5. package/{agentMachineCommands-EJBEFNZL.js → agentMachineCommands-5PALVQBD.js} +3 -3
  6. package/{agentRecordCommands-D2WA5AUO.js → agentRecordCommands-XEB66KRX.js} +11 -11
  7. package/{agentRunCommand-VUUNH3YL.js → agentRunCommand-IWXLTYGK.js} +11 -11
  8. package/{agentRuntimeLocal-W4BEGHEJ.js → agentRuntimeLocal-UWDOE55A.js} +2 -2
  9. package/{agentSlice-EZJ2W4JB.js → agentSlice-SZRRJ3ZX.js} +1 -1
  10. package/{appDeleteCommands-XNVZPXTU.js → appDeleteCommands-R63PZAY7.js} +2 -2
  11. package/{appDeployCommands-4ICNWWHP.js → appDeployCommands-VNRT54YO.js} +2 -2
  12. package/{appDeployStatusCommands-4KVAKNYQ.js → appDeployStatusCommands-6IPTKLEM.js} +2 -2
  13. package/{appGetCommands-YH4FTUX5.js → appGetCommands-JPFVMVAI.js} +2 -2
  14. package/{appListCommands-ZB7CYVNS.js → appListCommands-B3SLTPII.js} +2 -2
  15. package/{chatQueueReduxAdapter-2ZZZYKI3.js → chatQueueReduxAdapter-IEX32ZVP.js} +2 -2
  16. package/{chunk-YW4YRQUH.js → chunk-2UDMTJOM.js} +2 -2
  17. package/{chunk-Z4OGZWYZ.js → chunk-37LDAHQN.js} +3 -3
  18. package/{chunk-AQBJUKBP.js → chunk-7BNPRRDS.js} +9 -9
  19. package/{chunk-HZKZP7QH.js → chunk-FR2AIV4Q.js} +6 -6
  20. package/{chunk-AWHJWUVD.js → chunk-JL2PUYVS.js} +8 -8
  21. package/{chunk-DFW73ZMB.js → chunk-LJGEEYGC.js} +1 -1
  22. package/{chunk-QSGZ2QGY.js → chunk-LLKHGZME.js} +3 -3
  23. package/{chunk-NXXNT43Y.js → chunk-PU47HKTF.js} +7 -7
  24. package/{chunk-XV4KDZ5L.js → chunk-REOW4YJX.js} +1 -1
  25. package/{chunk-QZPRTYLL.js → chunk-RO3AEN3L.js} +2 -2
  26. package/{chunk-WXOIYS2X.js → chunk-SBPGB6TF.js} +2 -2
  27. package/{chunk-7VCY56GH.js → chunk-U2FRXKC7.js} +1 -1
  28. package/{chunk-SIMPRWQ7.js → chunk-V44VE7R4.js} +1 -1
  29. package/{chunk-5AQ5Q6ZE.js → chunk-XS543SNR.js} +3 -3
  30. package/{chunk-7QJGS6K6.js → chunk-XTSVOICC.js} +54 -16
  31. package/{chunk-ITESDS27.js → chunk-YH3FPBG6.js} +376 -0
  32. package/{createAgentAutomationAction-GU3N7CWJ.js → createAgentAutomationAction-72NNXELT.js} +3 -3
  33. package/{createDialogAction-6E3BEQGM.js → createDialogAction-3CJ2GXNO.js} +4 -4
  34. package/{createPageAction-OBDG5ZXM.js → createPageAction-HZHQGQO6.js} +3 -3
  35. package/{dialogCommands-6I6TJNOH.js → dialogCommands-2BF4ZSWH.js} +2 -2
  36. package/{dialogSlice-Y57RVHZZ.js → dialogSlice-5R4O4377.js} +2 -2
  37. package/{docCreateCommands-KXOH2X2A.js → docCreateCommands-HMZUBFGL.js} +2 -2
  38. package/{docDeleteCommands-XHLPIXGC.js → docDeleteCommands-DFR7GCOR.js} +2 -2
  39. package/{docReadCommands-2BKCIAZ5.js → docReadCommands-YM7RDUAZ.js} +2 -2
  40. package/{docStore-A7I2ZFQB.js → docStore-A4SRW2DJ.js} +4 -4
  41. package/{docUpdateCommands-2XQJWZHN.js → docUpdateCommands-TTQBD7IU.js} +2 -2
  42. package/{handleSendMessageAction-HK2OIE4N.js → handleSendMessageAction-CIFBZCI2.js} +2 -2
  43. package/index.js +40 -40
  44. package/{machineCommands-NCNUR7QK.js → machineCommands-QSW4JKR2.js} +11 -11
  45. package/{machineWsRunDispatch-R7MHM75C.js → machineWsRunDispatch-X3ZC7DZJ.js} +11 -11
  46. package/package.json +1 -1
  47. package/{readlineWorkspace-ZA2HSCJI.js → readlineWorkspace-P6PZ64PS.js} +250 -124
  48. package/{runAgentClientLoop-FDNHKKGE.js → runAgentClientLoop-5I2R74NR.js} +8 -8
  49. package/{spaceCommands-LIBLXFUQ.js → spaceCommands-EZYMMJJH.js} +2 -2
  50. package/{spaceSlice-36IQZFI6.js → spaceSlice-TL2FR4AF.js} +3 -3
  51. package/{streamAgentChatTurn-2P5KBPCO.js → streamAgentChatTurn-UDYSE2ES.js} +10 -10
  52. package/{tools-SOOBK33N.js → tools-KWYWDJ77.js} +6 -6
  53. package/{updateDialogTitleAction-5ITPS25R.js → updateDialogTitleAction-NQCOEOLF.js} +3 -3
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-CWMSB67P.js";
14
14
  import {
15
15
  runLlm
16
- } from "./chunk-5AQ5Q6ZE.js";
16
+ } from "./chunk-XS543SNR.js";
17
17
  import {
18
18
  cleanupCliSessionForDialog
19
19
  } from "./chunk-FH7VUJN5.js";
@@ -3520,7 +3520,7 @@ var messageSlice = createSliceWithThunks({
3520
3520
  runtimeOptions: args.runtimeOptions
3521
3521
  });
3522
3522
  if (agentKeyToUse) {
3523
- const { streamAgentChatTurn } = await import("./agentSlice-EZJ2W4JB.js");
3523
+ const { streamAgentChatTurn } = await import("./agentSlice-SZRRJ3ZX.js");
3524
3524
  await dispatch(
3525
3525
  streamAgentChatTurn({
3526
3526
  agentKey: agentKeyToUse,
@@ -4779,7 +4779,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4779
4779
  }
4780
4780
  if (isCurrentDialog) {
4781
4781
  await thunkApi.dispatch(resetMsgs());
4782
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-Y57RVHZZ.js");
4782
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-5R4O4377.js");
4783
4783
  dispatch(clearPendingAttachments2());
4784
4784
  clearWorkflow();
4785
4785
  }
@@ -4788,15 +4788,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4788
4788
 
4789
4789
  // packages/chat/dialog/dialogSlice.ts
4790
4790
  var runCreateDialogAction = async (args, thunkApi) => {
4791
- const { createDialogAction } = await import("./createDialogAction-6E3BEQGM.js");
4791
+ const { createDialogAction } = await import("./createDialogAction-3CJ2GXNO.js");
4792
4792
  return createDialogAction(args, thunkApi);
4793
4793
  };
4794
4794
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
4795
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-GU3N7CWJ.js");
4795
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-72NNXELT.js");
4796
4796
  return createAgentAutomationAction(args, thunkApi);
4797
4797
  };
4798
4798
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
4799
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-5ITPS25R.js");
4799
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-NQCOEOLF.js");
4800
4800
  return updateDialogTitleAction(args, thunkApi);
4801
4801
  };
4802
4802
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -4820,7 +4820,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
4820
4820
  return setDialogExtraReferencesAction(args, thunkApi);
4821
4821
  };
4822
4822
  var runHandleSendMessageAction = async (args, thunkApi) => {
4823
- const { handleSendMessageAction } = await import("./handleSendMessageAction-HK2OIE4N.js");
4823
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-CIFBZCI2.js");
4824
4824
  return handleSendMessageAction(args, thunkApi);
4825
4825
  };
4826
4826
  function clearDialogState() {
@@ -4833,7 +4833,7 @@ var createPageAndAddReference = createAsyncThunk(
4833
4833
  async (payload, { dispatch, getState, rejectWithValue }) => {
4834
4834
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
4835
4835
  try {
4836
- const { createDocState } = await import("./docStore-A7I2ZFQB.js");
4836
+ const { createDocState } = await import("./docStore-A4SRW2DJ.js");
4837
4837
  const pageKey = await createDocState(
4838
4838
  { slateData, title },
4839
4839
  { dispatch, getState }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-AQBJUKBP.js";
4
+ } from "./chunk-7BNPRRDS.js";
5
5
  import {
6
6
  canonicalizeToolNames
7
7
  } from "./chunk-ZZ2MH7LE.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-7QJGS6K6.js";
4
+ } from "./chunk-XTSVOICC.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-AQBJUKBP.js";
7
+ } from "./chunk-7BNPRRDS.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-ITESDS27.js";
10
+ } from "./chunk-YH3FPBG6.js";
11
11
  import {
12
12
  resolveLocalRuntimeEnvFromPolicy
13
13
  } from "./chunk-RQFO3CAF.js";
@@ -8,10 +8,10 @@ import {
8
8
  inlineImageUrlsForCustomProvider,
9
9
  prepareTools,
10
10
  shouldInlineImageUrlsForAgent
11
- } from "./chunk-DFW73ZMB.js";
11
+ } from "./chunk-LJGEEYGC.js";
12
12
  import {
13
13
  performFetchRequest
14
- } from "./chunk-Z4OGZWYZ.js";
14
+ } from "./chunk-37LDAHQN.js";
15
15
  import {
16
16
  createSSEParser,
17
17
  createToolRunId,
@@ -22,22 +22,22 @@ import {
22
22
  toolRunSetPending,
23
23
  toolRunStarted,
24
24
  toolRunSucceeded
25
- } from "./chunk-AQBJUKBP.js";
25
+ } from "./chunk-7BNPRRDS.js";
26
26
  import {
27
27
  getCurrentSpaceId
28
- } from "./chunk-YW4YRQUH.js";
28
+ } from "./chunk-2UDMTJOM.js";
29
29
  import {
30
30
  addToolMessage,
31
31
  messageStreamEnd,
32
32
  messageStreaming,
33
33
  updateToolMessage
34
- } from "./chunk-AWHJWUVD.js";
34
+ } from "./chunk-JL2PUYVS.js";
35
35
  import {
36
36
  streamAgentChatTurn
37
- } from "./chunk-5AQ5Q6ZE.js";
37
+ } from "./chunk-XS543SNR.js";
38
38
  import {
39
39
  EMPTY_ASSISTANT_REPAIR_PROMPT
40
- } from "./chunk-ITESDS27.js";
40
+ } from "./chunk-YH3FPBG6.js";
41
41
  import {
42
42
  accumulateToolCallDelta,
43
43
  createThinkParserState,
@@ -30,7 +30,7 @@ import {
30
30
  spawnToWebStreams,
31
31
  truncateToolOutput,
32
32
  waitForNodeProcessExit
33
- } from "./chunk-ITESDS27.js";
33
+ } from "./chunk-YH3FPBG6.js";
34
34
  import {
35
35
  createThinkParserState,
36
36
  createToolCallAccumulator,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-YW4YRQUH.js";
3
+ } from "./chunk-2UDMTJOM.js";
4
4
  import {
5
5
  prepareAndPersistMessage,
6
6
  uiAskChoiceFunc,
7
7
  uiAskChoiceFunctionSchema
8
- } from "./chunk-AWHJWUVD.js";
8
+ } from "./chunk-JL2PUYVS.js";
9
9
  import {
10
10
  require_date_fns
11
11
  } from "./chunk-M76ECQRD.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  updateContentTitle
3
- } from "./chunk-YW4YRQUH.js";
3
+ } from "./chunk-2UDMTJOM.js";
4
4
  import {
5
5
  require_date_fns
6
6
  } from "./chunk-M76ECQRD.js";
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
367
367
  }
368
368
  }
369
369
  async function createDocState(args, thunkApi) {
370
- const { createPageAction } = await import("./createPageAction-OBDG5ZXM.js");
370
+ const { createPageAction } = await import("./createPageAction-HZHQGQO6.js");
371
371
  return createPageAction(args, thunkApi);
372
372
  }
373
373
  function subscribe(listener) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-Z4OGZWYZ.js";
4
+ } from "./chunk-37LDAHQN.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-YDTYDA5W.js";
13
13
  import {
14
14
  clearCliLocalRuntimePreparedAgentCache
15
- } from "./chunk-7QJGS6K6.js";
15
+ } from "./chunk-XTSVOICC.js";
16
16
  import {
17
17
  resolveCliAgentKeyInput
18
18
  } from "./chunk-EKLRRZIN.js";
@@ -304,7 +304,7 @@ var slice = createSliceWithThunks({
304
304
  const overrides = {};
305
305
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
306
306
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
307
- const { _executeModel } = await import("./_executeModel-2N36X5OJ.js");
307
+ const { _executeModel } = await import("./_executeModel-XKWVTZAY.js");
308
308
  return _executeModel(
309
309
  {
310
310
  isStreaming: args.isStreaming ?? false,
@@ -325,7 +325,7 @@ var slice = createSliceWithThunks({
325
325
  * - 循环直到无工具调用或触发其他运行时停止条件
326
326
  */
327
327
  runAgent: create.asyncThunk(async (args, thunkApi) => {
328
- const { runAgentClientLoop } = await import("./runAgentClientLoop-FDNHKKGE.js");
328
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-5I2R74NR.js");
329
329
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
330
330
  {
331
331
  agentKey: args.agentKey,
@@ -341,7 +341,7 @@ var slice = createSliceWithThunks({
341
341
  * 聊天轮次流式 Agent 调用
342
342
  */
343
343
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
344
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-2P5KBPCO.js");
344
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-UDYSE2ES.js");
345
345
  return streamAgentChatTurnHandler(args, thunkApi);
346
346
  }),
347
347
  /**
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  inlineImageUrlsForCustomProvider,
22
22
  prepareTools
23
- } from "./chunk-DFW73ZMB.js";
23
+ } from "./chunk-LJGEEYGC.js";
24
24
  import {
25
25
  getServerProviderSecret
26
26
  } from "./chunk-HS7MLR74.js";
@@ -39,7 +39,7 @@ import {
39
39
  rememberMemoryFunctionSchema,
40
40
  resolveAgentRequiredPackIds,
41
41
  setTodoListFunc
42
- } from "./chunk-AQBJUKBP.js";
42
+ } from "./chunk-7BNPRRDS.js";
43
43
  import {
44
44
  createDrainExhaustedResponse,
45
45
  isCoreDrainingBody,
@@ -55,13 +55,13 @@ import {
55
55
  prepareTokenUsageData,
56
56
  resolveBuiltinPlatformAgentConfig,
57
57
  runKeyed
58
- } from "./chunk-AWHJWUVD.js";
58
+ } from "./chunk-JL2PUYVS.js";
59
59
  import {
60
60
  BUILTIN_TITLE_LLM_CONFIG
61
61
  } from "./chunk-RCFIB45Q.js";
62
62
  import {
63
63
  fetchServerSyncedCredential
64
- } from "./chunk-5AQ5Q6ZE.js";
64
+ } from "./chunk-XS543SNR.js";
65
65
  import {
66
66
  require_date_fns
67
67
  } from "./chunk-M76ECQRD.js";
@@ -86,7 +86,7 @@ import {
86
86
  parseSyncServersEnv,
87
87
  resolveAgentNextAvailableAt,
88
88
  resolveOpenAiCompatibleProviderConfig
89
- } from "./chunk-XV4KDZ5L.js";
89
+ } from "./chunk-REOW4YJX.js";
90
90
  import {
91
91
  buildPlatformChatCompletionRequest,
92
92
  canUsePlatformChatProvider,
@@ -105,7 +105,7 @@ import {
105
105
  import {
106
106
  resolveHistoricalToolContentCap,
107
107
  summarizeToolArguments
108
- } from "./chunk-ITESDS27.js";
108
+ } from "./chunk-YH3FPBG6.js";
109
109
  import {
110
110
  convertMessagesToResponsesInput,
111
111
  toResponsesTools
@@ -423,8 +423,16 @@ var STRINGS = {
423
423
  zh: "\u5F53\u524D\u73AF\u5883\u6CA1\u6709\u53EF\u7528\u7684\u526A\u8D34\u677F\u3002\u6700\u540E\u4E00\u6761\u56DE\u590D\u5DF2\u6253\u5370\u5728\u4E0A\u65B9\uFF0C\u53EF\u624B\u52A8\u590D\u5236\u3002"
424
424
  },
425
425
  copyUsage: {
426
- en: "Usage: /copy",
427
- zh: "\u7528\u6CD5\uFF1A/copy"
426
+ en: "Usage: /copy or /copy view",
427
+ zh: "\u7528\u6CD5\uFF1A/copy \u6216 /copy view"
428
+ },
429
+ copyViewTitle: {
430
+ en: "Copy view \u2014 conversation history",
431
+ zh: "\u590D\u5236\u89C6\u56FE \u2014 \u5BF9\u8BDD\u5386\u53F2"
432
+ },
433
+ copyViewHint: {
434
+ en: "Drag to select. Use PageUp/PageDown, Home/End, or the mouse wheel to scroll. Press Esc or Enter to return.",
435
+ zh: "\u76F4\u63A5\u62D6\u9009\u3002\u53EF\u7528 PageUp/PageDown\u3001Home/End \u6216\u9F20\u6807\u6EDA\u8F6E\u6EDA\u52A8\u3002\u6309 Esc \u6216 Enter \u8FD4\u56DE\u3002"
428
436
  },
429
437
  historyNoToken: {
430
438
  en: "History requires an auth token. Run `nolo login` or set AUTH_TOKEN.",
@@ -706,8 +714,10 @@ var STRINGS = {
706
714
  " /resume <dialogId> Resume a dialog directly by id",
707
715
  " /lang <zh|en> Switch interface language",
708
716
  " /copy Copy the last reply to the clipboard",
717
+ " /copy view Open native scrollback for partial selection (Ctrl+O)",
709
718
  " /mouse <on|off> Toggle mouse mode (off = drag to select text)",
710
719
  " /altscreen <on|off> Toggle the terminal alternate screen (default on; off shares shell scrollback)",
720
+ " Shift+drag Select text natively even while mouse mode is on (terminal bypass)",
711
721
  " /doc List attached docs",
712
722
  " /doc attach <doc> Attach a doc to this workspace",
713
723
  " /skill List attached skills",
@@ -741,8 +751,10 @@ var STRINGS = {
741
751
  " /resume <dialogId> \u6309 id \u76F4\u63A5\u6062\u590D\u5BF9\u8BDD",
742
752
  " /lang <zh|en> \u5207\u6362\u754C\u9762\u8BED\u8A00",
743
753
  " /copy \u590D\u5236\u6700\u540E\u4E00\u6761\u56DE\u590D\u5230\u526A\u8D34\u677F",
754
+ " /copy view \u6253\u5F00\u539F\u751F\u56DE\u6EDA\u8FDB\u884C\u8DE8\u5C4F\u62D6\u9009\uFF08Ctrl+O\uFF09",
744
755
  " /mouse <on|off> \u5207\u6362\u9F20\u6807\u6A21\u5F0F\uFF08off \u540E\u53EF\u76F4\u63A5\u62D6\u9009\u6587\u672C\uFF09",
745
756
  " /altscreen <on|off> \u5207\u6362\u7EC8\u7AEF\u5907\u7528\u5C4F\uFF08\u9ED8\u8BA4 on\uFF1Boff \u6539\u4E3A\u4E0E shell \u5171\u7528\u56DE\u6EDA\uFF09",
757
+ " Shift+\u62D6\u62FD \u9F20\u6807\u6A21\u5F0F\u5F00\u542F\u65F6\u4E5F\u53EF\u539F\u751F\u9009\u4E2D\u6587\u672C\uFF08\u7EC8\u7AEF\u7ED5\u8FC7\u4FEE\u9970\u952E\uFF09",
746
758
  " /doc \u5217\u51FA\u5DF2\u6302\u8F7D\u7684\u6587\u6863",
747
759
  " /doc attach <doc> \u6302\u8F7D\u6587\u6863\u5230\u5F53\u524D\u5DE5\u4F5C\u533A",
748
760
  " /skill \u5217\u51FA\u5DF2\u6302\u8F7D\u7684\u6280\u80FD",
@@ -11231,12 +11243,16 @@ function createCliLocalRuntimeAdapter(deps) {
11231
11243
  }
11232
11244
  } : void 0;
11233
11245
  if (isAntigravityOAuthAgent(agentConfig)) {
11234
- const accessToken = await apiKeyRefResolver("antigravity");
11235
- if (!accessToken) {
11236
- throw new Error(
11237
- 'OAuth credential for "antigravity" not found locally. Run `nolo auth antigravity`.'
11238
- );
11239
- }
11246
+ const resolveAccessToken = async () => {
11247
+ const accessToken = await apiKeyRefResolver("antigravity");
11248
+ if (!accessToken) {
11249
+ throw new Error(
11250
+ 'OAuth credential for "antigravity" not found locally. Run `nolo auth antigravity`.'
11251
+ );
11252
+ }
11253
+ return accessToken;
11254
+ };
11255
+ await resolveAccessToken();
11240
11256
  const credential = readOAuthCredential("antigravity");
11241
11257
  const { requestedToolNames: requestedToolNames2, tools: tools2 } = resolveProviderOpenAiToolBundle(
11242
11258
  agentConfig,
@@ -11272,9 +11288,10 @@ function createCliLocalRuntimeAdapter(deps) {
11272
11288
  requestedToolNames: requestedToolNames2,
11273
11289
  openAiToolNames: summarizeOpenAiToolNames(tools2)
11274
11290
  });
11275
- const result = await fetchAntigravityCloudCodeCompletion({
11291
+ const accessToken = await resolveAccessToken();
11292
+ const sendCcaRequest = (token) => fetchAntigravityCloudCodeCompletion({
11276
11293
  agentConfig,
11277
- accessToken,
11294
+ accessToken: token,
11278
11295
  metadata: credential?.metadata ?? null,
11279
11296
  openAiBody,
11280
11297
  signal: options?.signal,
@@ -11285,6 +11302,27 @@ function createCliLocalRuntimeAdapter(deps) {
11285
11302
  loopbackRequest
11286
11303
  })
11287
11304
  });
11305
+ let result = await sendCcaRequest(accessToken);
11306
+ if (result.status === 401) {
11307
+ try {
11308
+ const refreshed = await apiKeyRefResolver("antigravity", {
11309
+ force: true
11310
+ });
11311
+ if (refreshed && refreshed !== accessToken) {
11312
+ logLocalRuntimeDiagnostic("provider.request.auth_retry", {
11313
+ agentKey: agentConfig.key,
11314
+ transport: "antigravity-cloud-code"
11315
+ });
11316
+ result = await sendCcaRequest(refreshed);
11317
+ }
11318
+ } catch (error) {
11319
+ logLocalRuntimeDiagnostic("provider.request.auth_retry_failed", {
11320
+ agentKey: agentConfig.key,
11321
+ transport: "antigravity-cloud-code",
11322
+ error: toErrorMessage(error)
11323
+ });
11324
+ }
11325
+ }
11288
11326
  await recordLocalAvailability(result.status, result.body);
11289
11327
  if (result.status < 200 || result.status >= 300) {
11290
11328
  const errMsg = result.body && typeof result.body === "object" && result.body.error && typeof result.body.error.message === "string" ? result.body.error.message : JSON.stringify(result.body);