nolo-cli 0.26.2 → 0.27.1

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 (77) hide show
  1. package/{_executeModel-ZPNYAEFW.js → _executeModel-M6KLIXW5.js} +18 -18
  2. package/{agentDeleteCommand-5ZV4433K.js → agentDeleteCommand-VFHDZJG3.js} +12 -12
  3. package/{agentEmailCommands-Z7KOYDVQ.js → agentEmailCommands-NQ3SJXZX.js} +24 -24
  4. package/{agentListCommands-UQUXJYUN.js → agentListCommands-BDDUYHLP.js} +14 -14
  5. package/{agentMachineCommands-53O6P6L5.js → agentMachineCommands-5WU7B2UY.js} +13 -13
  6. package/{agentRecordCommands-ZRYNBSSS.js → agentRecordCommands-FFFARZTU.js} +23 -23
  7. package/{agentRunCommand-B73MKVOG.js → agentRunCommand-GZYQTIYF.js} +23 -23
  8. package/{agentRuntimeLocal-GVNERRKQ.js → agentRuntimeLocal-552R4CZA.js} +9 -9
  9. package/{agentSlice-OJBHIL34.js → agentSlice-N7E7SG25.js} +1 -1
  10. package/{appDeleteCommands-23Z3Z6KE.js → appDeleteCommands-IPJT6IYW.js} +13 -13
  11. package/{appDeployCommands-3MFAR4Z7.js → appDeployCommands-24P4CADQ.js} +13 -13
  12. package/{appDeployStatusCommands-JHU6GSN4.js → appDeployStatusCommands-3DRZOUAG.js} +13 -13
  13. package/{appGetCommands-24J55H2Y.js → appGetCommands-JEOSBLUL.js} +13 -13
  14. package/{appListCommands-HE5KP3PH.js → appListCommands-EIBM54WR.js} +13 -13
  15. package/{authCommand-KGRK6MNU.js → authCommand-MKMYHD52.js} +6 -6
  16. package/{chunk-ADE6577S.js → chunk-4OHJCHIL.js} +11 -11
  17. package/{chunk-GNGOZMU2.js → chunk-4RXTDRTJ.js} +3 -3
  18. package/{chunk-KURQBS7S.js → chunk-6MBOZ4UP.js} +1 -1
  19. package/{chunk-JJ2WUBFN.js → chunk-6V6MYXPV.js} +1 -1
  20. package/{chunk-GD23ZX7Z.js → chunk-7ORW7XI4.js} +3 -3
  21. package/{chunk-AZW5AHMW.js → chunk-7WMLPRXP.js} +1 -1
  22. package/{chunk-GGB6MPHD.js → chunk-AYQYOZYH.js} +16 -16
  23. package/{chunk-RM464B7I.js → chunk-BAKXXTAC.js} +2 -2
  24. package/{chunk-PTKI7TIN.js → chunk-C4KV25UH.js} +84 -32
  25. package/{chunk-CWTT2NZ6.js → chunk-ESKT7YVG.js} +2 -2
  26. package/{chunk-ZFL3LTU7.js → chunk-FL42U2NZ.js} +2 -2
  27. package/{chunk-AOPOTHFK.js → chunk-FRN5QOKN.js} +1 -1
  28. package/{chunk-LEHTC2FI.js → chunk-GT3GG2H7.js} +2 -1
  29. package/{chunk-AAWJ5S3G.js → chunk-H7N2NOJF.js} +1 -1
  30. package/{chunk-MCXQNEJ3.js → chunk-HALKDXKP.js} +1 -1
  31. package/{chunk-5EDKWSQN.js → chunk-J2GZXLI7.js} +12 -266
  32. package/{chunk-CMKUBIGW.js → chunk-JDSUTNYY.js} +2 -2
  33. package/{chunk-PY7VGC5M.js → chunk-JQ3LNEMS.js} +3 -2
  34. package/{chunk-PMCKFQYC.js → chunk-KXEWHQAW.js} +1 -1
  35. package/{chunk-G36SUBHA.js → chunk-L3QFIBZG.js} +1 -1
  36. package/{chunk-S7AV3NCK.js → chunk-MAFUFDFV.js} +11 -11
  37. package/{chunk-TNM27YZ7.js → chunk-NCRWA6ZB.js} +3 -3
  38. package/{chunk-TLYHUIWF.js → chunk-NWDOO373.js} +3 -3
  39. package/{chunk-5DWZ46RJ.js → chunk-O5VFD7V6.js} +1 -1
  40. package/{chunk-LLDGWLML.js → chunk-PPAJNYFB.js} +8 -8
  41. package/{chunk-YJY7HODU.js → chunk-PVWFM7JP.js} +1 -1
  42. package/{chunk-SIUEKVK4.js → chunk-TTPVLL5F.js} +103 -25
  43. package/{chunk-XNZJVYFS.js → chunk-UTYJ47H2.js} +1 -1
  44. package/{chunk-TWA4L7J7.js → chunk-VV4TYWNV.js} +1 -1
  45. package/{chunk-CV6BM7LU.js → chunk-X43U4JUJ.js} +1 -1
  46. package/{chunk-PXPISYEH.js → chunk-XS7UPVR7.js} +2 -2
  47. package/{chunk-CZHE6LLV.js → chunk-YTA2QOEE.js} +20 -0
  48. package/{chunk-P3RZ6DHN.js → chunk-YZV4676I.js} +24 -15
  49. package/chunk-ZJ7WLPDP.js +553 -0
  50. package/{chunk-J2WT5CEO.js → chunk-ZNFZGHKL.js} +1 -1
  51. package/{cliExecutor-K3F7DMRO.js → cliExecutor-BBUVQU4L.js} +1 -1
  52. package/{createAgentAutomationAction-PO62NUR7.js → createAgentAutomationAction-GU766YRL.js} +6 -6
  53. package/{createDialogAction-ORFRYI3C.js → createDialogAction-ADMDJITX.js} +7 -7
  54. package/{createPageAction-XWVMNTYH.js → createPageAction-N7EZJVO5.js} +6 -6
  55. package/{dialogCommands-XTJHROXM.js → dialogCommands-O4CJJRTQ.js} +13 -13
  56. package/{dialogSlice-DJXC53YW.js → dialogSlice-JB5YIV5K.js} +6 -6
  57. package/{docCreateCommands-T2XRVXYS.js → docCreateCommands-2U5AIF3O.js} +12 -12
  58. package/{docDeleteCommands-L7RXFXY3.js → docDeleteCommands-EDCAUQEF.js} +13 -13
  59. package/{docReadCommands-M5PYNADQ.js → docReadCommands-KFMBFGPY.js} +12 -12
  60. package/{docStore-6LKLLFDW.js → docStore-EXPYXKAO.js} +7 -7
  61. package/{docUpdateCommands-OA5EGPLQ.js → docUpdateCommands-57M4XOT7.js} +12 -12
  62. package/{getPricing-6C3C47Y4.js → getPricing-X6I23RN6.js} +3 -3
  63. package/{handleSendMessageAction-ILFGZTN5.js → handleSendMessageAction-5E3MBI4X.js} +6 -6
  64. package/index.js +47 -47
  65. package/{machineCommands-AKAQGPAO.js → machineCommands-UPDXXKGX.js} +23 -23
  66. package/{machineWsRunDispatch-RSBERM64.js → machineWsRunDispatch-M43IR6SD.js} +22 -22
  67. package/{models-ILWKIX2Y.js → models-YT32CTT5.js} +2 -2
  68. package/package.json +1 -1
  69. package/{readlineWorkspace-TUH3SFHO.js → readlineWorkspace-NEADCABU.js} +30 -27
  70. package/{runAgentClientLoop-C3QB2EXV.js → runAgentClientLoop-NYY3IGNZ.js} +15 -15
  71. package/{spaceCommands-SXYOFGUJ.js → spaceCommands-XK46FRYG.js} +12 -12
  72. package/{spaceSlice-6BHMRP5O.js → spaceSlice-S6HBDF4N.js} +6 -6
  73. package/{streamAgentChatTurn-GF5W5OIP.js → streamAgentChatTurn-2NP4RW7O.js} +18 -18
  74. package/{tools-KBCLJ43G.js → tools-2HPUZOTG.js} +10 -10
  75. package/{tuiSummaryLlmCaller-ARIMGILF.js → tuiSummaryLlmCaller-GCUPULOV.js} +4 -4
  76. package/{updateDialogTitleAction-LMHZUY4Q.js → updateDialogTitleAction-27EH4CEC.js} +6 -6
  77. package/chunk-ZUXIXYJI.js +0 -297
@@ -5,10 +5,10 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-ZFL3LTU7.js";
8
+ } from "./chunk-FL42U2NZ.js";
9
9
  import {
10
10
  performFetchRequest
11
- } from "./chunk-5EDKWSQN.js";
11
+ } from "./chunk-J2GZXLI7.js";
12
12
  import {
13
13
  createSSEParser,
14
14
  createToolRunId,
@@ -19,7 +19,7 @@ import {
19
19
  toolRunSetPending,
20
20
  toolRunStarted,
21
21
  toolRunSucceeded
22
- } from "./chunk-GGB6MPHD.js";
22
+ } from "./chunk-AYQYOZYH.js";
23
23
  import {
24
24
  getPublicImageAgentMode
25
25
  } from "./chunk-VIDPVFP3.js";
@@ -29,13 +29,13 @@ import {
29
29
  messageStreaming,
30
30
  selectCurrentSpaceId,
31
31
  updateToolMessage
32
- } from "./chunk-ADE6577S.js";
32
+ } from "./chunk-4OHJCHIL.js";
33
33
  import {
34
34
  streamAgentChatTurn
35
- } from "./chunk-GD23ZX7Z.js";
35
+ } from "./chunk-7ORW7XI4.js";
36
36
  import {
37
37
  EMPTY_ASSISTANT_REPAIR_PROMPT
38
- } from "./chunk-P3RZ6DHN.js";
38
+ } from "./chunk-YZV4676I.js";
39
39
  import {
40
40
  accumulateToolCallDelta,
41
41
  createThinkParserState,
@@ -47,10 +47,10 @@ import {
47
47
  } from "./chunk-N7J63Q6C.js";
48
48
  import {
49
49
  getModelInfo
50
- } from "./chunk-PY7VGC5M.js";
50
+ } from "./chunk-JQ3LNEMS.js";
51
51
  import {
52
52
  getApiEndpoint
53
- } from "./chunk-LEHTC2FI.js";
53
+ } from "./chunk-GT3GG2H7.js";
54
54
  import {
55
55
  addActiveController,
56
56
  removeActiveController,
@@ -7,7 +7,7 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-PMCKFQYC.js";
10
+ } from "./chunk-KXEWHQAW.js";
11
11
  import {
12
12
  buildDialogAttachmentPlan,
13
13
  extractFileContentIds
@@ -4,10 +4,11 @@ import {
4
4
  providerHttpFailure,
5
5
  readSseFrames,
6
6
  throwIfChatCompletionStreamFailed
7
- } from "./chunk-MCXQNEJ3.js";
7
+ } from "./chunk-HALKDXKP.js";
8
8
  import {
9
- parseToolArgumentsJson
10
- } from "./chunk-P3RZ6DHN.js";
9
+ parseToolArgumentsJson,
10
+ resolveHistoricalToolContentCap
11
+ } from "./chunk-YZV4676I.js";
11
12
  import {
12
13
  createThinkParserState,
13
14
  createToolCallAccumulator,
@@ -18,7 +19,7 @@ import {
18
19
  import {
19
20
  requiresBareImageUrl,
20
21
  toBareImageUrlMessages
21
- } from "./chunk-ZUXIXYJI.js";
22
+ } from "./chunk-ZJ7WLPDP.js";
22
23
  import {
23
24
  shouldStripReasoningContentForOutbound,
24
25
  toOpenAiCompatibleMessages
@@ -26,7 +27,7 @@ import {
26
27
  import {
27
28
  buildProviderAuthHeaders,
28
29
  buildProviderExecutionPlan
29
- } from "./chunk-PXPISYEH.js";
30
+ } from "./chunk-XS7UPVR7.js";
30
31
  import {
31
32
  NOLO_WORKSPACE_TOOL_NAMES,
32
33
  buildNoloWorkspaceCommandArgs,
@@ -1204,10 +1205,43 @@ async function executeLocalToolWithPolicy(args) {
1204
1205
 
1205
1206
  // packages/agent-runtime/localWorkspaceTools.ts
1206
1207
  import { existsSync as existsSync2 } from "node:fs";
1208
+ import { createHash } from "node:crypto";
1207
1209
  import { mkdir, readdir, readFile, stat, writeFile } from "node:fs/promises";
1208
1210
  import { dirname, relative, resolve, sep } from "node:path";
1209
1211
  import { spawnSync, spawn as spawnChildProcess } from "node:child_process";
1210
1212
 
1213
+ // packages/core/readRangeLedger.ts
1214
+ function filterRetainedLedgerRecords(records, retainedCap) {
1215
+ return records.filter((record) => record.chars <= retainedCap);
1216
+ }
1217
+ function isValidRange(range) {
1218
+ return Number.isInteger(range.startLine) && Number.isInteger(range.endLine) && range.endLine >= range.startLine;
1219
+ }
1220
+ function mergeLineRanges(ranges) {
1221
+ const sorted = ranges.filter(isValidRange).slice().sort((a, b) => a.startLine - b.startLine);
1222
+ const merged = [];
1223
+ for (const range of sorted) {
1224
+ const last = merged[merged.length - 1];
1225
+ if (last && range.startLine <= last.endLine + 1) {
1226
+ last.endLine = Math.max(last.endLine, range.endLine);
1227
+ } else {
1228
+ merged.push({ startLine: range.startLine, endLine: range.endLine });
1229
+ }
1230
+ }
1231
+ return merged;
1232
+ }
1233
+ function isLineRangeCovered(request, covered) {
1234
+ if (!isValidRange(request)) return false;
1235
+ let open = request.startLine;
1236
+ for (const range of mergeLineRanges(covered)) {
1237
+ if (range.endLine < open) continue;
1238
+ if (range.startLine > open) return false;
1239
+ open = range.endLine + 1;
1240
+ if (open > request.endLine) return true;
1241
+ }
1242
+ return open > request.endLine;
1243
+ }
1244
+
1211
1245
  // packages/agent-runtime/runtimeCompat.ts
1212
1246
  import { existsSync, readdirSync, statSync } from "node:fs";
1213
1247
  import { join } from "node:path";
@@ -1557,7 +1591,7 @@ function buildReadWorkspaceDescription(variant) {
1557
1591
  if (variant === "antiShell") {
1558
1592
  return "Read a UTF-8 text file inside the workspace. Prefer readFile over shell commands (cat/head/tail).";
1559
1593
  }
1560
- return "Read a UTF-8 text file inside the workspace. Use lines for focused range reads after searchFiles to save tokens.";
1594
+ return "Read a UTF-8 text file inside the workspace. Use lines for focused range reads after searchFiles to save tokens. A range already delivered earlier for an unchanged file answers with a short notice instead of resending (force:true refetches).";
1561
1595
  }
1562
1596
  function buildReadWorkspaceParameters(variant) {
1563
1597
  const path = buildWorkspacePathProperty();
@@ -1572,9 +1606,13 @@ function buildReadWorkspaceParameters(variant) {
1572
1606
  required: ["path"]
1573
1607
  };
1574
1608
  }
1609
+ const force = {
1610
+ type: "boolean",
1611
+ description: "Refetch even when the requested range was already delivered earlier and the file is unchanged (e.g. after context compaction)."
1612
+ };
1575
1613
  return {
1576
1614
  type: "object",
1577
- properties: { path, lines },
1615
+ properties: { path, lines, force },
1578
1616
  required: ["path"]
1579
1617
  };
1580
1618
  }
@@ -3097,6 +3135,7 @@ ${tail}`,
3097
3135
  truncatedByCharLimit: true
3098
3136
  };
3099
3137
  }
3138
+ var READ_FILE_LEDGER_MAX_RECORDS = 64;
3100
3139
  async function readFileTool(args) {
3101
3140
  const parsed = parseWorkspaceToolArguments(args.call.arguments);
3102
3141
  const requestedPath = requireWorkspaceToolPath(parsed);
@@ -3117,26 +3156,61 @@ async function readFileTool(args) {
3117
3156
  totalLines: sliced.totalLines
3118
3157
  });
3119
3158
  const isTruncated = sliced.truncated || truncatedRead.truncatedByCharLimit;
3120
- return {
3121
- content: truncatedRead.content,
3122
- metadata: {
3123
- path: normalizeWorkspaceRelativePath({
3124
- workspaceRoot: resolve(args.workspaceRoot),
3125
- targetPath: absolutePath
3126
- }),
3127
- bytes: Buffer.byteLength(truncatedRead.content),
3128
- totalBytes: Buffer.byteLength(content),
3129
- startLine: sliced.startLine,
3130
- endLine: sliced.endLine,
3131
- totalLines: sliced.totalLines,
3132
- truncated: isTruncated,
3133
- ...truncatedRead.truncatedByCharLimit ? { truncatedByByteLimit: true, truncatedByCharLimit: true } : {},
3134
- ...sliceArgs.maxLines ? { maxLines: sliceArgs.maxLines } : {},
3135
- ...sliceArgs.tailLines ? { tailLines: sliceArgs.tailLines } : {},
3136
- ...warnings.length ? { warnings: [...warnings, buildReadFileSliceHint(sliced.totalLines)] } : {},
3137
- ...activity ? { activity } : {}
3159
+ const relativePath = normalizeWorkspaceRelativePath({
3160
+ workspaceRoot: resolve(args.workspaceRoot),
3161
+ targetPath: absolutePath
3162
+ });
3163
+ const force = parsed.force === true;
3164
+ const ledger = args.readLedger;
3165
+ const requestRange = { startLine: sliced.startLine, endLine: sliced.endLine };
3166
+ const fingerprint = createHash("sha1").update(content).digest("hex").slice(0, 20);
3167
+ let entry = ledger?.get(relativePath);
3168
+ if (entry && entry.fingerprint !== fingerprint) {
3169
+ entry = void 0;
3170
+ ledger?.delete(relativePath);
3171
+ }
3172
+ if (!force && entry && ledger) {
3173
+ const retainedCap = resolveHistoricalToolContentCap("readFile", 0);
3174
+ const retained = filterRetainedLedgerRecords(entry.records, retainedCap);
3175
+ if (retained.length > 0 && isLineRangeCovered(requestRange, retained)) {
3176
+ return {
3177
+ content: `[readFile] ${relativePath} lines ${requestRange.startLine}-${requestRange.endLine} were already delivered earlier and the file is unchanged; not resending. Pass force:true to refetch.`,
3178
+ metadata: {
3179
+ path: relativePath,
3180
+ startLine: requestRange.startLine,
3181
+ endLine: requestRange.endLine,
3182
+ totalLines: sliced.totalLines,
3183
+ deduped: true,
3184
+ ...warnings.length ? { warnings: [...warnings, buildReadFileSliceHint(sliced.totalLines)] } : {},
3185
+ ...activity ? { activity } : {}
3186
+ }
3187
+ };
3138
3188
  }
3189
+ }
3190
+ const metadata = {
3191
+ path: relativePath,
3192
+ bytes: Buffer.byteLength(truncatedRead.content),
3193
+ totalBytes: Buffer.byteLength(content),
3194
+ startLine: sliced.startLine,
3195
+ endLine: sliced.endLine,
3196
+ totalLines: sliced.totalLines,
3197
+ truncated: isTruncated,
3198
+ ...truncatedRead.truncatedByCharLimit ? { truncatedByByteLimit: true, truncatedByCharLimit: true } : {},
3199
+ ...sliceArgs.maxLines ? { maxLines: sliceArgs.maxLines } : {},
3200
+ ...sliceArgs.tailLines ? { tailLines: sliceArgs.tailLines } : {},
3201
+ ...warnings.length ? { warnings: [...warnings, buildReadFileSliceHint(sliced.totalLines)] } : {},
3202
+ ...activity ? { activity } : {}
3139
3203
  };
3204
+ if (!isTruncated && ledger) {
3205
+ const persistedChars = truncatedRead.content.length + "\n\n[tool metadata]\n".length + JSON.stringify(metadata).length;
3206
+ const records = entry?.records ?? [];
3207
+ records.push({ ...requestRange, chars: persistedChars });
3208
+ ledger.set(relativePath, {
3209
+ fingerprint,
3210
+ records: records.slice(-READ_FILE_LEDGER_MAX_RECORDS)
3211
+ });
3212
+ }
3213
+ return { content: truncatedRead.content, metadata };
3140
3214
  }
3141
3215
  async function writeFileTool(args) {
3142
3216
  const parsed = parseWorkspaceToolArguments(args.call.arguments);
@@ -3894,6 +3968,7 @@ async function listProcessesTool(args) {
3894
3968
  }
3895
3969
  function createLocalWorkspaceToolExecutors(args) {
3896
3970
  const fileAccess = args.confirmExternalFileAccess ? { confirmExternalFileAccess: args.confirmExternalFileAccess } : {};
3971
+ const readFileLedger = /* @__PURE__ */ new Map();
3897
3972
  const searchBinaryResolvers = {
3898
3973
  ...args.resolveRipgrepBinary ? { resolveRipgrepBinary: args.resolveRipgrepBinary } : {},
3899
3974
  ...args.resolveGrepBinary ? { resolveGrepBinary: args.resolveGrepBinary } : {}
@@ -3918,6 +3993,7 @@ function createLocalWorkspaceToolExecutors(args) {
3918
3993
  readFile: (call) => readFileTool({
3919
3994
  call,
3920
3995
  workspaceRoot: args.workspaceRoot,
3996
+ readLedger: readFileLedger,
3921
3997
  ...fileAccess
3922
3998
  }),
3923
3999
  writeFile: (call) => writeFileTool({
@@ -4089,6 +4165,8 @@ export {
4089
4165
  evaluateShellCommandPolicy,
4090
4166
  resolveLocalToolPolicy,
4091
4167
  executeLocalToolWithPolicy,
4168
+ filterRetainedLedgerRecords,
4169
+ isLineRangeCovered,
4092
4170
  getProcessRegistry,
4093
4171
  buildLocalWorkspaceToolset,
4094
4172
  buildLocalWorkspacePolicyToolNames,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  trimTrailingSlash
3
- } from "./chunk-PXPISYEH.js";
3
+ } from "./chunk-XS7UPVR7.js";
4
4
  import {
5
5
  asTrimmedLowercaseString
6
6
  } from "./chunk-QSJ3HFEF.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getAntigravityUserAgent
3
- } from "./chunk-XNZJVYFS.js";
3
+ } from "./chunk-UTYJ47H2.js";
4
4
  import {
5
5
  writeOAuthCredential
6
6
  } from "./chunk-JZPBVBIY.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readDbRecord,
3
3
  writeAgentRecord
4
- } from "./chunk-J2WT5CEO.js";
4
+ } from "./chunk-ZNFZGHKL.js";
5
5
  import {
6
6
  buildSkillSummaryMarker
7
7
  } from "./chunk-VF4K2QE6.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getModelConfig
3
- } from "./chunk-LEHTC2FI.js";
3
+ } from "./chunk-GT3GG2H7.js";
4
4
  import {
5
5
  isPlatformHostedClaudeModel,
6
6
  isPlatformHostedGrokModel
7
- } from "./chunk-CZHE6LLV.js";
7
+ } from "./chunk-YTA2QOEE.js";
8
8
  import {
9
9
  asTrimmedLowercaseString
10
10
  } from "./chunk-QSJ3HFEF.js";
@@ -98,6 +98,26 @@ var googleModels = [
98
98
  priority: { inputOutput: 1.8, cache: 1.8 }
99
99
  }
100
100
  },
101
+ {
102
+ name: "gemini-3.7-flash",
103
+ displayName: "Gemini 3.7 Flash",
104
+ provider: "google",
105
+ description: "Gemini 3.7 Flash model for fast frontier agentic, coding, and multimodal tasks.",
106
+ hasVision: true,
107
+ hasAudio: true,
108
+ contextWindow: 1048576,
109
+ maxOutputTokens: 65536,
110
+ supportsTool: true,
111
+ supportsReasoningEffort: true,
112
+ // Official promo pricing: $0.75/$3.75/$0.075 per 1M through 2026-12-31.
113
+ // Antigravity's subscription wire route is tiered; Gemini API uses this logical id.
114
+ price: {
115
+ input: 0.75 * 7,
116
+ output: 3.75 * 7,
117
+ cachingWrite: 0.075 * 7,
118
+ cachingRead: 0.075 * 7
119
+ }
120
+ },
101
121
  createGoogleImageModel({
102
122
  name: "gemini-3-pro-image-preview",
103
123
  displayName: "Nano Banana Pro (Gemini 3 Pro Image Preview)",
@@ -1,23 +1,23 @@
1
1
  import {
2
- MENU_USAGE_INSTRUCTIONS,
3
2
  buildCurrentTimeBlock,
4
3
  buildIdentityBlock,
5
- buildRuntimeGuidanceBlocks
6
- } from "./chunk-ZUXIXYJI.js";
4
+ buildRuntimeGuidanceBlocks,
5
+ resolveToolGuidedSections
6
+ } from "./chunk-ZJ7WLPDP.js";
7
7
  import {
8
8
  estimateTokenCount,
9
9
  getModelContextWindow,
10
10
  planCompression,
11
11
  planContextUsage,
12
12
  serializeMessageContent
13
- } from "./chunk-PY7VGC5M.js";
13
+ } from "./chunk-JQ3LNEMS.js";
14
14
  import {
15
15
  clipCompactText
16
16
  } from "./chunk-5MMAK75Q.js";
17
17
  import {
18
18
  findModelConfig,
19
19
  getProviderByModelName
20
- } from "./chunk-LEHTC2FI.js";
20
+ } from "./chunk-GT3GG2H7.js";
21
21
  import {
22
22
  buildDialogSummaryLayer
23
23
  } from "./chunk-AL2V7U3E.js";
@@ -90,6 +90,7 @@ var isCustomAgent = (agent) => {
90
90
  return apiSource === "custom" || provider === "custom";
91
91
  };
92
92
  var ANTIGRAVITY_EFFORT_SUFFIXES = [
93
+ "-tiered",
93
94
  "-extra-low",
94
95
  "-low",
95
96
  "-medium",
@@ -327,9 +328,9 @@ var DEFAULT_TOOL_OUTPUT_PROFILE = {
327
328
  headRatio: 0.5
328
329
  };
329
330
  var TOOL_OUTPUT_PROFILES = {
330
- readFile: { maxChars: 4800, headRatio: 0.68 },
331
- read_file: { maxChars: 4800, headRatio: 0.68 },
332
- readWorkspaceFile: { maxChars: 4800, headRatio: 0.68 },
331
+ readFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
332
+ read_file: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
333
+ readWorkspaceFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
333
334
  searchFiles: { maxChars: 3600, headRatio: 0.78 },
334
335
  search_files: { maxChars: 3600, headRatio: 0.78 },
335
336
  listFiles: { maxChars: 2800, headRatio: 0.85 },
@@ -339,11 +340,15 @@ var TOOL_OUTPUT_PROFILES = {
339
340
  launchProcess: { maxChars: 2800, headRatio: 0.35 },
340
341
  editFile: { maxChars: 2800, headRatio: 0.62 },
341
342
  writeFile: { maxChars: 2400, headRatio: 0.62 },
342
- readPastedText: { maxChars: 4800, headRatio: 0.5 }
343
+ readPastedText: { maxChars: 4800, headRatio: 0.5, historicalMaxChars: 4800 }
343
344
  };
344
345
  function resolveToolOutputProfile(toolName) {
345
346
  return (toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0) ?? DEFAULT_TOOL_OUTPUT_PROFILE;
346
347
  }
348
+ function resolveHistoricalToolContentCap(toolName, historicalMaxChars) {
349
+ const profile = toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0;
350
+ return profile?.historicalMaxChars !== void 0 ? Math.max(historicalMaxChars, profile.historicalMaxChars) : historicalMaxChars;
351
+ }
347
352
  function projectToolMessageContent(input) {
348
353
  const { content, isFresh, toolName, historicalMaxChars } = input;
349
354
  if (isFresh) {
@@ -356,8 +361,9 @@ function projectToolMessageContent(input) {
356
361
  \u2026[\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${content.length} \u5B57\u7B26]`
357
362
  );
358
363
  }
359
- if (content.length <= historicalMaxChars) return content;
360
- return content.slice(0, historicalMaxChars) + `
364
+ const cap = resolveHistoricalToolContentCap(toolName, historicalMaxChars);
365
+ if (content.length <= cap) return content;
366
+ return content.slice(0, cap) + `
361
367
  \u2026[\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${content.length} \u5B57\u7B26]`;
362
368
  }
363
369
  function clipToolText(content, maxChars, headRatio, marker = "\n\n[... tool output middle omitted; head/tail preserved ...]\n\n") {
@@ -990,12 +996,14 @@ ${suffix(clipped.length)}`;
990
996
  return projected.length <= args.maxChars ? projected : projected.slice(0, args.maxChars);
991
997
  }
992
998
  function summarizeHistoricalToolContent(content, toolName, metadata) {
993
- const profile = resolveToolOutputProfile(toolName);
994
999
  return projectToolContentForProvider({
995
1000
  content,
996
1001
  toolName,
997
1002
  metadata,
998
- maxChars: Math.min(profile.maxChars, MAX_HISTORICAL_TOOL_CONTENT_CHARS),
1003
+ // Same single source of truth as the server path and the read ledgers:
1004
+ // read-family tools keep their profile historical cap (4800) cross-turn,
1005
+ // unprofiled tools fall back to the flat historical budget.
1006
+ maxChars: resolveHistoricalToolContentCap(toolName, MAX_HISTORICAL_TOOL_CONTENT_CHARS),
999
1007
  label: "historical tool result truncated for the next turn"
1000
1008
  });
1001
1009
  }
@@ -1258,13 +1266,13 @@ async function runLocalAgentTurn(input) {
1258
1266
  agentConfig.exposedToolNames ?? agentConfig.toolNames ?? []
1259
1267
  );
1260
1268
  const guidanceBlocks = buildRuntimeGuidanceBlocks(agentTools);
1261
- const menuUsageBlock = agentTools.includes("ask_user") ? MENU_USAGE_INSTRUCTIONS : "";
1269
+ const toolGuidedSections = resolveToolGuidedSections(agentTools);
1262
1270
  const guidanceScopes = [
1263
1271
  guidanceBlocks.startupProtocol,
1264
1272
  guidanceBlocks.contextLayerContract,
1265
1273
  guidanceBlocks.emailRegistrationWorkflow,
1266
1274
  guidanceBlocks.webResearchToolPolicy,
1267
- menuUsageBlock
1275
+ ...Object.values(toolGuidedSections)
1268
1276
  ].map((content) => content.trim()).filter((content) => content.length > 0).map((content) => ({ content, cacheScope: "session" }));
1269
1277
  const currentTimeScope = [
1270
1278
  { content: buildCurrentTimeBlock(/* @__PURE__ */ new Date(), void 0), cacheScope: "turn" }
@@ -1628,6 +1636,7 @@ export {
1628
1636
  parseToolArgumentsJson,
1629
1637
  summarizeToolArguments,
1630
1638
  resolveAgentImageInputSupport,
1639
+ resolveHistoricalToolContentCap,
1631
1640
  projectToolMessageContent,
1632
1641
  LOCAL_AGENT_CONFIG_MISSING_CODE,
1633
1642
  EMPTY_ASSISTANT_REPAIR_PROMPT,