nolo-cli 0.74.0-alpha.2 → 0.74.0

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 (83) hide show
  1. package/{_executeModel-YEVZAJYX.js → _executeModel-IULR47HG.js} +20 -20
  2. package/{agentDeleteCommand-WVO3JTH6.js → agentDeleteCommand-2S4WCDQC.js} +15 -14
  3. package/{agentEmailCommands-QYQ2DZUS.js → agentEmailCommands-V3ADGHX7.js} +29 -27
  4. package/{agentListCommands-XWLQZ2ZH.js → agentListCommands-EPK3S274.js} +17 -16
  5. package/{agentMachineCommands-BJZUZ2EY.js → agentMachineCommands-XMZWK7P3.js} +15 -14
  6. package/{agentRecordCommands-O6PYBK2A.js → agentRecordCommands-WFPWLWOF.js} +28 -26
  7. package/{agentRunCommand-POFC5W46.js → agentRunCommand-VUWNWC7C.js} +28 -26
  8. package/{agentRuntimeLocal-O6DZDTK4.js → agentRuntimeLocal-YRONTDLM.js} +15 -14
  9. package/{agentSlice-RRZS2UII.js → agentSlice-2P7OJFES.js} +1 -1
  10. package/{appDeleteCommands-426QK2XG.js → appDeleteCommands-YS7UGMP3.js} +16 -15
  11. package/{appDeployCommands-FIGFGXIJ.js → appDeployCommands-XIE5Z4BE.js} +16 -15
  12. package/{appDeployStatusCommands-D3B235FQ.js → appDeployStatusCommands-54UDVYET.js} +16 -15
  13. package/{appGetCommands-U6RZJII4.js → appGetCommands-6XYLBCRN.js} +16 -15
  14. package/{appListCommands-732PFEWM.js → appListCommands-VEGH7SF5.js} +16 -15
  15. package/{authCommand-EVGFLAHO.js → authCommand-JIEOFHXW.js} +84 -9
  16. package/{chatQueueReduxAdapter-LSBTGZW2.js → chatQueueReduxAdapter-GPYCH5Z2.js} +5 -5
  17. package/chromeCommands-VOIRNJBL.js +499 -0
  18. package/chromeOpsCommands-M7DPCX2T.js +258 -0
  19. package/{chunk-SJTCDYBY.js → chunk-3VPDELAP.js} +41 -30
  20. package/{chunk-CS36XM4N.js → chunk-4SZ37KLL.js} +21 -9
  21. package/{chunk-FPTQQSS6.js → chunk-73BR2IQT.js} +23 -2
  22. package/{chunk-PYXL2CJL.js → chunk-7FWPLK4M.js} +1 -1
  23. package/{chunk-DSRXPQWA.js → chunk-7QVPPOEC.js} +1 -1
  24. package/{chunk-KIS76A2P.js → chunk-AX7RMXSH.js} +1 -1
  25. package/{chunk-HSELVGAL.js → chunk-BKJO7LDP.js} +2 -2
  26. package/{chunk-Q6FF2MCK.js → chunk-BOYUESO7.js} +1 -1
  27. package/{chunk-GBPZKFYK.js → chunk-BZNGCVAW.js} +1 -1
  28. package/{chunk-EXMHJN7C.js → chunk-CADAR6QU.js} +1 -1
  29. package/{chunk-2QDDKFG5.js → chunk-CQ3WA2NE.js} +77 -0
  30. package/{chunk-AFIKMMGC.js → chunk-D6XYLSOS.js} +1 -1
  31. package/{chunk-TI4CCL34.js → chunk-DM4FBSWG.js} +3 -3
  32. package/{chunk-DWPNOYMB.js → chunk-DUJWWUGV.js} +1 -1
  33. package/{chunk-XGZM6BTX.js → chunk-EBKMQULC.js} +66 -120
  34. package/{chunk-ZLPA7K55.js → chunk-ETLZZQJE.js} +2 -2
  35. package/chunk-FMODTASJ.js +109 -0
  36. package/{chunk-FSFQ3A7S.js → chunk-FNGAF7C4.js} +2 -2
  37. package/{chunk-MYU3MJCF.js → chunk-GCJ3IS5M.js} +0 -1
  38. package/{chunk-XPQJXIF5.js → chunk-GHEJJGJI.js} +125 -25
  39. package/{chunk-DFY6PUV4.js → chunk-HTMVBPOF.js} +7 -7
  40. package/{chunk-VOEW2KF3.js → chunk-IDGYOD2O.js} +59 -55
  41. package/{chunk-2JCTE5UN.js → chunk-KEZNSFGD.js} +3 -3
  42. package/{chunk-I4UWPYBH.js → chunk-KRMWO2NN.js} +2 -2
  43. package/{chunk-PGSKWZCB.js → chunk-LHDV2QUI.js} +1 -1
  44. package/{chunk-UJ63UXGE.js → chunk-MXUSPS2N.js} +289 -2
  45. package/{chunk-3IT2PFHL.js → chunk-NB5SIWC4.js} +1 -1
  46. package/{chunk-HXAINXPQ.js → chunk-NFT2AOK5.js} +2 -2
  47. package/{chunk-QA6YKM3H.js → chunk-NRALD3CC.js} +1 -1
  48. package/{chunk-CJ23A7U4.js → chunk-PF6O3GR3.js} +533 -57
  49. package/{chunk-K7AG465Q.js → chunk-PZCTYKGU.js} +3 -1
  50. package/chunk-QCZX4FTW.js +242 -0
  51. package/{chunk-QBA5KMJI.js → chunk-RZOJRTKR.js} +29 -15
  52. package/{chunk-VE3O45CJ.js → chunk-T25L377S.js} +4 -4
  53. package/{chunk-CMH2SYHX.js → chunk-TMPLPCVX.js} +1 -1
  54. package/{chunk-L2Y24GRM.js → chunk-U7YP7ECK.js} +3 -3
  55. package/{chunk-AWPU7GXU.js → chunk-URWDSZRW.js} +2 -2
  56. package/{chunk-AFIWC5NH.js → chunk-WL2RKIBF.js} +1 -1
  57. package/{chunk-57VRXRLF.js → chunk-Y3NZYLPG.js} +1 -1
  58. package/{chunk-V3ZKNK5D.js → chunk-ZVN6I33J.js} +5 -5
  59. package/{codingSkills-E6KSDNSJ.js → codingSkills-7S6523WH.js} +2 -2
  60. package/{contentThunks-476Y6CFR.js → contentThunks-THSCADSK.js} +6 -6
  61. package/{createAgentAutomationAction-DN4SFTP5.js → createAgentAutomationAction-WGN3UQ5A.js} +6 -6
  62. package/{createDialogAction-2GS4JCMU.js → createDialogAction-3EN2NLH7.js} +8 -8
  63. package/{createPageAction-44WTUMZ5.js → createPageAction-4VK473QV.js} +6 -6
  64. package/{dialogCommands-7FH6Z2YK.js → dialogCommands-PS4NWYY7.js} +16 -15
  65. package/{dialogSlice-7HEVCJFT.js → dialogSlice-CLV7SVOZ.js} +5 -5
  66. package/{docCreateCommands-GN5E5ULM.js → docCreateCommands-4KANZJR6.js} +15 -14
  67. package/{docDeleteCommands-OQWPPQME.js → docDeleteCommands-F2S2TRUF.js} +16 -15
  68. package/{docReadCommands-E4QK2223.js → docReadCommands-B2WDPZQE.js} +15 -14
  69. package/{docStore-LJ7KNKFB.js → docStore-TDLCHWPF.js} +1 -1
  70. package/{docUpdateCommands-ZDJE4SI7.js → docUpdateCommands-E7TKHRIO.js} +15 -14
  71. package/{getPricing-HRMSOF3E.js → getPricing-QVTUQQTM.js} +2 -2
  72. package/{handleSendMessageAction-ETA5QZIN.js → handleSendMessageAction-AHL3ZHE4.js} +5 -5
  73. package/index.js +111 -47
  74. package/{machineCommands-SJLMLCCV.js → machineCommands-OTABVXOA.js} +27 -25
  75. package/{machineWsRunDispatch-74GHVCNY.js → machineWsRunDispatch-V4EVQSMZ.js} +27 -25
  76. package/package.json +1 -1
  77. package/{readlineWorkspace-XHS5C5F7.js → readlineWorkspace-IIT3FQ6I.js} +437 -115
  78. package/{runAgentClientLoop-2PGZSCET.js → runAgentClientLoop-7TQM7IAR.js} +18 -18
  79. package/{spaceCommands-GSQCO2LI.js → spaceCommands-FSYH7AL4.js} +15 -14
  80. package/{streamAgentChatTurn-I6FUM6RV.js → streamAgentChatTurn-6EF6TVFK.js} +22 -22
  81. package/{tools-KU4X5HGZ.js → tools-R3QNWWTD.js} +15 -13
  82. package/{tuiSummaryLlmCaller-J5BEPLW5.js → tuiSummaryLlmCaller-PWOXTCBF.js} +5 -5
  83. package/{updateDialogTitleAction-E3SNB75W.js → updateDialogTitleAction-F3EUOWOB.js} +6 -6
@@ -0,0 +1,258 @@
1
+ import {
2
+ createChromeConnectorClient
3
+ } from "./chunk-QCZX4FTW.js";
4
+ import {
5
+ toErrorMessage
6
+ } from "./chunk-HNMXYYJR.js";
7
+ import {
8
+ readOption
9
+ } from "./chunk-A7GB5UGH.js";
10
+ import "./chunk-OLZBQWZU.js";
11
+ import "./chunk-KUG52IAP.js";
12
+ import "./chunk-LCBAMY2M.js";
13
+ import "./chunk-4SN6J65J.js";
14
+ import "./chunk-CF7PE763.js";
15
+ import "./chunk-G3SUCT4W.js";
16
+ import "./chunk-4VNS5WPM.js";
17
+
18
+ // packages/cli/chromeOpsCommands.ts
19
+ import { writeFile } from "node:fs/promises";
20
+ function wantsHelp(args) {
21
+ return args.includes("--help") || args.includes("-h");
22
+ }
23
+ function readTrimmedOption(args, flag) {
24
+ return (readOption(args, flag) ?? "").trim();
25
+ }
26
+ function readIntOption(args, flag, usage) {
27
+ const raw = readOption(args, flag);
28
+ if (raw === void 0) return void 0;
29
+ const value = Number.parseInt(raw, 10);
30
+ if (!Number.isFinite(value)) {
31
+ throw new Error(`Invalid ${flag} <N>. Usage: ${usage}`);
32
+ }
33
+ return value;
34
+ }
35
+ function requireTabId(args, usage) {
36
+ const tabId = readTrimmedOption(args, "--tab");
37
+ if (!tabId) {
38
+ throw new Error(`Missing required --tab <id>. Usage: ${usage}`);
39
+ }
40
+ return tabId;
41
+ }
42
+ function requireTarget(args, usage) {
43
+ const elementRef = readTrimmedOption(args, "--ref");
44
+ const selector = readTrimmedOption(args, "--selector");
45
+ if (!elementRef && !selector) {
46
+ throw new Error(
47
+ `Provide --ref <elementRef> (from read-page) or --selector <css>. Usage: ${usage}`
48
+ );
49
+ }
50
+ return {
51
+ ...elementRef ? { elementRef } : {},
52
+ ...selector ? { selector } : {}
53
+ };
54
+ }
55
+ var CHROME_OPS_SUBCOMMANDS = {
56
+ "list-tabs": {
57
+ action: "list_tabs",
58
+ usage: "nolo chrome list-tabs",
59
+ payload: () => ({})
60
+ },
61
+ "open-tab": {
62
+ action: "open_tab",
63
+ usage: "nolo chrome open-tab --url <url> [--active]",
64
+ payload: (args, usage) => {
65
+ const url = readTrimmedOption(args, "--url");
66
+ if (!url) {
67
+ throw new Error(`Missing required --url <url>. Usage: ${usage}`);
68
+ }
69
+ return { url, active: args.includes("--active") };
70
+ }
71
+ },
72
+ "close-tab": {
73
+ action: "close_tab",
74
+ usage: "nolo chrome close-tab --tab <id>",
75
+ payload: (args, usage) => ({ tabId: requireTabId(args, usage) })
76
+ },
77
+ "read-page": {
78
+ action: "read_page",
79
+ usage: "nolo chrome read-page --tab <id> [--selector <css>] [--detail compact|full] [--max-elements N]",
80
+ payload: (args, usage) => {
81
+ const payload = { tabId: requireTabId(args, usage) };
82
+ const selector = readTrimmedOption(args, "--selector");
83
+ if (selector) payload.selector = selector;
84
+ const detail = readTrimmedOption(args, "--detail");
85
+ if (detail) payload.detail = detail;
86
+ const maxElements = readIntOption(args, "--max-elements", usage);
87
+ if (maxElements !== void 0) payload.maxElements = maxElements;
88
+ return payload;
89
+ }
90
+ },
91
+ click: {
92
+ action: "click",
93
+ usage: "nolo chrome click --tab <id> (--ref <elementRef> | --selector <css>)",
94
+ payload: (args, usage) => ({
95
+ tabId: requireTabId(args, usage),
96
+ ...requireTarget(args, usage)
97
+ })
98
+ },
99
+ type: {
100
+ action: "type",
101
+ usage: "nolo chrome type --tab <id> (--ref <elementRef> | --selector <css>) --text <text> [--append]",
102
+ payload: (args, usage) => {
103
+ const text = readOption(args, "--text");
104
+ if (text === void 0 || text.startsWith("--")) {
105
+ throw new Error(`Missing required --text <text>. Usage: ${usage}`);
106
+ }
107
+ return {
108
+ tabId: requireTabId(args, usage),
109
+ ...requireTarget(args, usage),
110
+ text,
111
+ ...args.includes("--append") ? { clearFirst: false } : {}
112
+ };
113
+ }
114
+ },
115
+ press: {
116
+ action: "press",
117
+ usage: "nolo chrome press --tab <id> --key <key>",
118
+ payload: (args, usage) => {
119
+ const key = readTrimmedOption(args, "--key");
120
+ if (!key) {
121
+ throw new Error(`Missing required --key <key>. Usage: ${usage}`);
122
+ }
123
+ return { tabId: requireTabId(args, usage), key };
124
+ }
125
+ },
126
+ scroll: {
127
+ action: "scroll",
128
+ usage: "nolo chrome scroll --tab <id> [--delta-x N] [--delta-y N]",
129
+ payload: (args, usage) => {
130
+ const payload = { tabId: requireTabId(args, usage) };
131
+ const deltaX = readIntOption(args, "--delta-x", usage);
132
+ const deltaY = readIntOption(args, "--delta-y", usage);
133
+ if (deltaX !== void 0) payload.deltaX = deltaX;
134
+ if (deltaY !== void 0) payload.deltaY = deltaY;
135
+ return payload;
136
+ }
137
+ },
138
+ screenshot: {
139
+ action: "screenshot",
140
+ usage: "nolo chrome screenshot --tab <id> [--out <path>] [--full-page]",
141
+ payload: (args, usage) => ({
142
+ tabId: requireTabId(args, usage),
143
+ ...args.includes("--full-page") ? { fullPage: true } : {}
144
+ })
145
+ },
146
+ "read-console": {
147
+ action: "read_console",
148
+ usage: "nolo chrome read-console --tab <id> [--limit N]",
149
+ payload: (args, usage) => {
150
+ const payload = { tabId: requireTabId(args, usage) };
151
+ const limit = readIntOption(args, "--limit", usage);
152
+ if (limit !== void 0) payload.limit = limit;
153
+ return payload;
154
+ }
155
+ },
156
+ "read-network": {
157
+ action: "read_network",
158
+ usage: "nolo chrome read-network --tab <id> [--limit N] [--include-assets]",
159
+ payload: (args, usage) => {
160
+ const payload = { tabId: requireTabId(args, usage) };
161
+ const limit = readIntOption(args, "--limit", usage);
162
+ if (limit !== void 0) payload.limit = limit;
163
+ if (args.includes("--include-assets")) payload.includeAssets = true;
164
+ return payload;
165
+ }
166
+ }
167
+ };
168
+ function renderChromeOpsHelp() {
169
+ const lines = [
170
+ "Operate the user's Chrome through the Nolo Chrome connector (the desktop bridge;",
171
+ "the same RPC the chrome_* agent tools use).",
172
+ "",
173
+ "Usage:",
174
+ " nolo chrome <subcommand> [flags]",
175
+ "",
176
+ "Subcommands:",
177
+ ...Object.values(CHROME_OPS_SUBCOMMANDS).map(
178
+ (spec) => ` ${spec.usage.replace(/^nolo chrome /, "")}`
179
+ ),
180
+ "",
181
+ "Notes:",
182
+ " --ref takes an elementRef copied from `nolo chrome read-page` (revision-scoped,",
183
+ " preferred over --selector); --selector takes a CSS selector.",
184
+ " Actions the connector classifies as irreversible (Submit / Delete / Pay ...)",
185
+ " are refused with CONFIRMATION_REQUIRED \u2014 ask the user to perform them.",
186
+ " Every subcommand prints the connector's raw JSON result; failures exit 1.",
187
+ " Endpoint: NOLO_CHROME_CONNECTOR_RPC_URL or http://127.0.0.1:38947/rpc."
188
+ ];
189
+ return lines.join("\n");
190
+ }
191
+ var CHROME_OPS_HELP_TEXT = renderChromeOpsHelp();
192
+ async function runChromeOpsCommand(subcommand, args, deps = {}) {
193
+ const io = {
194
+ stdout: (text) => console.log(text),
195
+ stderr: (text) => console.error(text),
196
+ ...deps.io
197
+ };
198
+ const spec = CHROME_OPS_SUBCOMMANDS[subcommand];
199
+ if (!spec) {
200
+ io.stderr(`Unknown chrome subcommand: ${subcommand}
201
+
202
+ ${CHROME_OPS_HELP_TEXT}`);
203
+ return 1;
204
+ }
205
+ if (wantsHelp(args)) {
206
+ io.stdout(CHROME_OPS_HELP_TEXT);
207
+ return 0;
208
+ }
209
+ let payload;
210
+ try {
211
+ payload = spec.payload(args, spec.usage);
212
+ } catch (error) {
213
+ io.stderr(toErrorMessage(error));
214
+ return 1;
215
+ }
216
+ let result;
217
+ try {
218
+ const client = deps.client ?? createChromeConnectorClient();
219
+ result = await client.request(spec.action, payload);
220
+ } catch (error) {
221
+ const code = typeof error?.code === "string" ? error.code : "CHROME_COMMAND_FAILED";
222
+ io.stderr(JSON.stringify({ ok: false, error: { code, message: toErrorMessage(error) } }, null, 2));
223
+ return 1;
224
+ }
225
+ if (subcommand === "screenshot") {
226
+ const out = readTrimmedOption(args, "--out");
227
+ const dataUrl = result?.dataUrl;
228
+ if (out && typeof dataUrl === "string") {
229
+ const base64 = dataUrl.includes(",") ? dataUrl.slice(dataUrl.indexOf(",") + 1) : dataUrl;
230
+ const bytes = Buffer.from(base64, "base64");
231
+ try {
232
+ await writeFile(out, bytes);
233
+ } catch (error) {
234
+ io.stderr(
235
+ JSON.stringify(
236
+ {
237
+ ok: false,
238
+ error: { code: "SCREENSHOT_WRITE_FAILED", message: toErrorMessage(error) }
239
+ },
240
+ null,
241
+ 2
242
+ )
243
+ );
244
+ return 1;
245
+ }
246
+ io.stdout(JSON.stringify({ ok: true, result: { savedTo: out, bytes: bytes.byteLength } }, null, 2));
247
+ return 0;
248
+ }
249
+ }
250
+ io.stdout(JSON.stringify({ ok: true, result }, null, 2));
251
+ return 0;
252
+ }
253
+ export {
254
+ CHROME_OPS_HELP_TEXT,
255
+ CHROME_OPS_SUBCOMMANDS,
256
+ renderChromeOpsHelp,
257
+ runChromeOpsCommand
258
+ };
@@ -27,7 +27,7 @@ import {
27
27
  resolveLocalUserId,
28
28
  t,
29
29
  toolLabel
30
- } from "./chunk-XPQJXIF5.js";
30
+ } from "./chunk-GHEJJGJI.js";
31
31
  import {
32
32
  createRunActivityTracker,
33
33
  popSingleQueueMessage,
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  readDbRecord,
49
49
  resolveAgentRecordFromHybridStore
50
- } from "./chunk-QA6YKM3H.js";
50
+ } from "./chunk-NRALD3CC.js";
51
51
  import {
52
52
  isLocalCliAgentKey
53
53
  } from "./chunk-SPAQ4PVV.js";
@@ -63,7 +63,7 @@ import {
63
63
  } from "./chunk-LTRXGFMS.js";
64
64
  import {
65
65
  formatAgentListCard
66
- } from "./chunk-QBA5KMJI.js";
66
+ } from "./chunk-RZOJRTKR.js";
67
67
  import {
68
68
  isTransientFetchError
69
69
  } from "./chunk-5XTOKQLW.js";
@@ -84,11 +84,11 @@ import {
84
84
  chooseMemoryOwners,
85
85
  loadMemoryCandidatesFromDb,
86
86
  resolveAgentMemoryPolicy
87
- } from "./chunk-2JCTE5UN.js";
87
+ } from "./chunk-KEZNSFGD.js";
88
88
  import {
89
89
  API_REPORTED_COST_MULTIPLIER,
90
90
  parseUiAskChoiceContent
91
- } from "./chunk-VOEW2KF3.js";
91
+ } from "./chunk-IDGYOD2O.js";
92
92
  import {
93
93
  isOAuthApiKeyRef
94
94
  } from "./chunk-YYLHWIW6.js";
@@ -111,38 +111,38 @@ import {
111
111
  LOCAL_AGENT_CONFIG_MISSING_CODE,
112
112
  LOCAL_TURN_ABORTED_CODE,
113
113
  readActionGate
114
- } from "./chunk-CJ23A7U4.js";
114
+ } from "./chunk-PF6O3GR3.js";
115
115
  import {
116
116
  resolveAgentRuntimeConfigFromRecord
117
- } from "./chunk-KIS76A2P.js";
117
+ } from "./chunk-AX7RMXSH.js";
118
118
  import {
119
119
  createThinkParserState,
120
120
  flushThinkParser,
121
121
  processThinkChunk
122
122
  } from "./chunk-N7J63Q6C.js";
123
- import {
124
- isAntigravityOAuthAgent
125
- } from "./chunk-PGSKWZCB.js";
126
- import {
127
- resolveClientVersion
128
- } from "./chunk-CMH2SYHX.js";
129
123
  import {
130
124
  isQuotaExhaustedError,
131
125
  isQuotaLimited403Body,
132
126
  mergeAvailabilityDeadline,
133
127
  resolveCooldownGate
134
128
  } from "./chunk-CJCJF5XB.js";
129
+ import {
130
+ isAntigravityOAuthAgent
131
+ } from "./chunk-LHDV2QUI.js";
132
+ import {
133
+ resolveClientVersion
134
+ } from "./chunk-TMPLPCVX.js";
135
135
  import {
136
136
  DEFAULT_CONTEXT_WINDOW,
137
137
  getModelContextWindow,
138
138
  normalizeUsage
139
- } from "./chunk-DSRXPQWA.js";
139
+ } from "./chunk-7QVPPOEC.js";
140
140
  import {
141
141
  clipCompactText
142
142
  } from "./chunk-E36HZARC.js";
143
143
  import {
144
144
  findModelConfig
145
- } from "./chunk-UJ63UXGE.js";
145
+ } from "./chunk-MXUSPS2N.js";
146
146
  import {
147
147
  compactWhitespace
148
148
  } from "./chunk-DWLEOOGR.js";
@@ -411,7 +411,7 @@ var fullwidthMaximumCodePoint = 65510;
411
411
  var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
412
412
  var wideMinimalCodePoint = 4352;
413
413
  var wideMaximumCodePoint = 262141;
414
- var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
414
+ var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101594, 101631, 101664, 101760, 101874, 101888, 102801, 102816, 102866, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110888, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110952, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127406, 127406, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128729, 128732, 128735, 128747, 128748, 128756, 128764, 128986, 128986, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129734, 129736, 129736, 129740, 129757, 129759, 129771, 129775, 129786, 131072, 196605, 196608, 262141];
415
415
 
416
416
  // node_modules/get-east-asian-width/utilities.js
417
417
  var isInRange = (ranges, codePoint) => {
@@ -456,7 +456,7 @@ var isAmbiguous = (codePoint) => {
456
456
  }
457
457
  return isInRange(ambiguousRanges, codePoint);
458
458
  };
459
- var isFullWidth = (codePoint) => {
459
+ var isFullwidth = (codePoint) => {
460
460
  if (codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint) {
461
461
  return false;
462
462
  }
@@ -480,7 +480,7 @@ function validate(codePoint) {
480
480
  }
481
481
  function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
482
482
  validate(codePoint);
483
- if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
483
+ if (isFullwidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
484
484
  return 2;
485
485
  }
486
486
  return 1;
@@ -1324,15 +1324,18 @@ function resolveTuiBrightnessSignal(env = process.env) {
1324
1324
  if (explicit === "dark") return "dark";
1325
1325
  if (activeThemeMode !== "terminal") return activeThemeMode;
1326
1326
  if (resolvedBrightness) return resolvedBrightness;
1327
- const colorfgbg = env.COLORFGBG ?? "";
1328
- if (colorfgbg) {
1329
- const parts = colorfgbg.split(";");
1330
- const bg = parts.length > 1 ? Number.parseInt(parts[1] ?? "", 10) : NaN;
1331
- if (!Number.isNaN(bg) && bg >= 0 && bg <= 6) return "dark";
1332
- if (!Number.isNaN(bg) && bg >= 7 && bg <= 15) return "light";
1333
- }
1327
+ const colorFgBgBrightness = detectColorFgBgBrightness(env);
1328
+ if (colorFgBgBrightness) return colorFgBgBrightness;
1334
1329
  return detectSystemBrightnessFromEnv(env);
1335
1330
  }
1331
+ function detectColorFgBgBrightness(env) {
1332
+ const parts = (env.COLORFGBG ?? "").split(";");
1333
+ const bg = Number.parseInt(parts.at(-1) ?? "", 10);
1334
+ if (Number.isNaN(bg)) return null;
1335
+ if (bg >= 0 && bg <= 6) return "dark";
1336
+ if (bg >= 7 && bg <= 15) return "light";
1337
+ return null;
1338
+ }
1336
1339
  function resolveTuiThemeMode(env = process.env, fallback = activeThemeMode) {
1337
1340
  const explicit = (env.NOLO_TUI_THEME ?? "").trim().toLowerCase();
1338
1341
  if (explicit === "light" || explicit === "dark") return explicit;
@@ -1489,9 +1492,12 @@ function surfaceBackgroundSequence(env = process.env, brightness = resolveTuiBri
1489
1492
  }
1490
1493
  function userSurfaceBackgroundSequence(env = process.env, brightness = resolveTuiBrightness(env)) {
1491
1494
  if (!supportsTruecolor(env)) return "";
1495
+ if (resolveTuiThemeMode(env) === "terminal" && activeTerminalBaseHex === null && detectColorFgBgBrightness(env) === null) {
1496
+ return "";
1497
+ }
1492
1498
  const palette = THEME_PALETTES[activeThemeName] ?? THEME_PALETTES.trail;
1493
- const surfaceHex = brightness === "light" ? palette.light.chrome.hex : palette.dark.accent.hex;
1494
- const weight = brightness === "dark" ? 0.3 : 0.08;
1499
+ const weight = brightness === "dark" ? 0.3 : 0.14;
1500
+ const surfaceHex = (brightness === "light" ? palette.light : palette.dark).accent.hex;
1495
1501
  return hexToBgSgr(blendHex(surfaceHex, resolveTerminalBaseHex(brightness), weight));
1496
1502
  }
1497
1503
  function themeText(text, token, colorEnabled = resolveCliColorEnabled(), env = process.env) {
@@ -10407,7 +10413,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
10407
10413
  // packages/cli/client/agentRun.ts
10408
10414
  import { ulid } from "ulid";
10409
10415
  async function loadRunLocalAgentTurn() {
10410
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-O6DZDTK4.js");
10416
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-YRONTDLM.js");
10411
10417
  return runLocalAgentTurn;
10412
10418
  }
10413
10419
  var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
@@ -11073,6 +11079,12 @@ async function runLocalAgentTurnForCli(options, settings) {
11073
11079
  ...options.parentDialogId ? { parentThreadId: options.parentDialogId } : {}
11074
11080
  } : void 0;
11075
11081
  const currentDialogId = options.continueDialogId ?? ulid();
11082
+ const turnId = `turn-${ulid()}`;
11083
+ const runtimeContextWithOwnership = {
11084
+ ...runtimeContext ?? {},
11085
+ dialogId: currentDialogId,
11086
+ turnId
11087
+ };
11076
11088
  const adapter = baseAdapter;
11077
11089
  const expandedMessage = options.pastedTextStore?.items.size ? expandCollapsedPastes(options.message, options.pastedTextStore) : options.message;
11078
11090
  const workingLabel = `${options.agentName} -> working locally`;
@@ -11108,11 +11120,10 @@ async function runLocalAgentTurnForCli(options, settings) {
11108
11120
  category: options.category,
11109
11121
  inheritedFromDialogKey: options.inheritedFromDialogKey,
11110
11122
  parentDialogId: options.parentDialogId,
11111
- runtimeContext,
11123
+ runtimeContext: runtimeContextWithOwnership,
11112
11124
  runKind: options.env.NOLO_AGENT_RUN_CHILD === "1" ? "subtask" : "interactive",
11113
11125
  background: options.background,
11114
11126
  noStream: options.noStream,
11115
- ...runtimeContext ? { runtimeContext } : {},
11116
11127
  ...options.contextBlockScopes?.length ? { contextBlockScopes: options.contextBlockScopes } : options.extraContextBlocks?.length ? { contextBlocks: options.extraContextBlocks } : {},
11117
11128
  ...typeof options.timeoutMs === "number" ? { timeoutMs: options.timeoutMs } : {},
11118
11129
  ...options.actionGateHandler ? { onActionGate: options.actionGateHandler } : {},
@@ -8,7 +8,7 @@ import {
8
8
  clipMultilineText,
9
9
  fetchAndSerializeTable,
10
10
  resolveBuiltinSkillPage
11
- } from "./chunk-QBA5KMJI.js";
11
+ } from "./chunk-RZOJRTKR.js";
12
12
  import {
13
13
  isGatewayHttpStatus
14
14
  } from "./chunk-NF64D32W.js";
@@ -29,25 +29,25 @@ import {
29
29
  } from "./chunk-MEYIRKDN.js";
30
30
  import {
31
31
  fetchAndCacheMessages
32
- } from "./chunk-VOEW2KF3.js";
32
+ } from "./chunk-IDGYOD2O.js";
33
33
  import {
34
34
  shouldUseServerProxy
35
35
  } from "./chunk-YYLHWIW6.js";
36
36
  import {
37
37
  fetchServerSyncedCredential
38
- } from "./chunk-TI4CCL34.js";
38
+ } from "./chunk-DM4FBSWG.js";
39
39
  import {
40
40
  buildSkillGuidancePromptBlock,
41
41
  extractRuntimePageCapabilities,
42
42
  resolveSkillGraphFromRoots
43
- } from "./chunk-3IT2PFHL.js";
43
+ } from "./chunk-NB5SIWC4.js";
44
44
  import {
45
45
  buildIdentityBlock,
46
46
  buildRuntimeGuidanceBlocks,
47
47
  compileContextLayers,
48
48
  normalizeChatCompletionsBodyForProvider,
49
49
  resolveToolGuidedSections
50
- } from "./chunk-ZLPA7K55.js";
50
+ } from "./chunk-ETLZZQJE.js";
51
51
  import {
52
52
  convertMessagesToResponsesInput,
53
53
  getUsageRequestOptions,
@@ -57,15 +57,15 @@ import {
57
57
  import {
58
58
  ANTIGRAVITY_CLOUD_CODE_BASE_URL,
59
59
  isAntigravityOAuthAgent
60
- } from "./chunk-PGSKWZCB.js";
60
+ } from "./chunk-LHDV2QUI.js";
61
61
  import {
62
62
  buildProviderAuthHeaders
63
- } from "./chunk-CMH2SYHX.js";
63
+ } from "./chunk-TMPLPCVX.js";
64
64
  import {
65
65
  isOpenAiResponsesModel,
66
66
  resolvePlatformChatCompletionsEndpoint,
67
67
  resolvePlatformResponsesEndpoint
68
- } from "./chunk-K7AG465Q.js";
68
+ } from "./chunk-PZCTYKGU.js";
69
69
  import {
70
70
  estimateTokenCount
71
71
  } from "./chunk-PSCNXBYA.js";
@@ -73,7 +73,7 @@ import {
73
73
  clampReasoningEffort,
74
74
  getModelConfig,
75
75
  isModelSupportReasoningEffort
76
- } from "./chunk-UJ63UXGE.js";
76
+ } from "./chunk-MXUSPS2N.js";
77
77
  import {
78
78
  createFileCredentialBroker
79
79
  } from "./chunk-3JQ2NRYU.js";
@@ -367,10 +367,12 @@ function isResponsesConversationStateRejection(status, responseBody) {
367
367
  // packages/agent-runtime/agentCallPlan.ts
368
368
  var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
369
369
  var CURSOR_AGENT_URL = "https://api2.cursor.sh/agent.v1.AgentService/Run";
370
+ var DEVIN_CONNECT_URL = "https://server.codeium.com/exa.api_server_pb.ApiServerService/GetChatMessage";
370
371
  function resolveClientWire(plan) {
371
372
  if (plan.upstreamWire === "gemini-cca") return "chat.completions";
372
373
  if (plan.upstreamWire === "anthropic-messages") return "chat.completions";
373
374
  if (plan.upstreamWire === "cursor-connect") return "chat.completions";
375
+ if (plan.upstreamWire === "devin-connect") return "chat.completions";
374
376
  if (plan.upstreamWire === "responses" && plan.authMethod.kind === "oauth" && plan.authMethod.ref === "chatgpt") {
375
377
  return "chat.completions";
376
378
  }
@@ -450,6 +452,16 @@ function resolveAgentCallPlan(agentConfig, _env) {
450
452
  vendor: provider || "cursor"
451
453
  };
452
454
  }
455
+ if (apiKeyRef === "devin" || provider === "devin") {
456
+ return {
457
+ authMethod: { kind: "oauth", ref: "devin" },
458
+ transport: "server-proxy",
459
+ upstreamWire: "devin-connect",
460
+ endpoint: DEVIN_CONNECT_URL,
461
+ requiredHeaders: ["connect-protocol-version"],
462
+ vendor: provider || "devin"
463
+ };
464
+ }
453
465
  if (agentConfig.cliProvider || agentConfig.apiSource === "cli" || provider === "cli") {
454
466
  return {
455
467
  authMethod: { kind: "cli", provider: agentConfig.cliProvider || provider || "codex" },
@@ -3,7 +3,10 @@ import {
3
3
  } from "./chunk-YYLHWIW6.js";
4
4
  import {
5
5
  compareAgentSelection
6
- } from "./chunk-V3ZKNK5D.js";
6
+ } from "./chunk-ZVN6I33J.js";
7
+ import {
8
+ isAntigravityOAuthAgent
9
+ } from "./chunk-LHDV2QUI.js";
7
10
  import {
8
11
  getModelAbility
9
12
  } from "./chunk-NG4UT4K4.js";
@@ -19,7 +22,18 @@ import {
19
22
  // packages/ai/agent/agentBilling.ts
20
23
  function resolveBillingSource(candidate) {
21
24
  if (candidate?.local === true || candidate?.isLocal === true || candidate?.cliProvider === "local" || candidate?.apiSource === "local" || candidate?.provider === "local" || candidate?.billingSource === "local") return "local";
22
- if (candidate?.isOwned !== true) return "platform_credits";
25
+ if (candidate?.isOwned !== true) {
26
+ const ownerUserId = typeof candidate?.userId === "string" && candidate.userId.trim() ? candidate.userId.trim() : typeof candidate?.ownerId === "string" && candidate.ownerId.trim() ? candidate.ownerId.trim() : "";
27
+ if (ownerUserId && (candidate?.isOAuth === true || isOAuthApiKeyRef(candidate?.apiKeyRef) || isAntigravityOAuthAgent({
28
+ key: "billing-source-probe",
29
+ apiKeyRef: candidate?.apiKeyRef ?? void 0,
30
+ provider: candidate?.provider ?? void 0,
31
+ customProviderUrl: candidate?.customProviderUrl ?? void 0
32
+ }))) {
33
+ return "owner_subscription";
34
+ }
35
+ return "platform_credits";
36
+ }
23
37
  if (candidate?.isOAuth === true || candidate?.billingSource === "user_subscription" || candidate?.apiSource === "oauth" || isOAuthApiKeyRef(candidate?.apiKeyRef)) return "user_subscription";
24
38
  if (candidate?.apiSource === "custom" || candidate?.billingSource === "user_api") {
25
39
  return "user_api";
@@ -217,6 +231,7 @@ function summarizeCredentialGroups(agents, now = Date.now()) {
217
231
  const groups = /* @__PURE__ */ new Map();
218
232
  for (const agent of agents) {
219
233
  if (!agent.credentialGroup || !agent.credentialKind) continue;
234
+ if (agent.isOwned === false) continue;
220
235
  const existing = groups.get(agent.credentialGroup);
221
236
  const at = typeof agent.nextAvailableAt === "number" && agent.nextAvailableAt > now ? agent.nextAvailableAt : void 0;
222
237
  if (!existing) {
@@ -278,6 +293,9 @@ function resolveFavoriteStatus(record, options) {
278
293
  if (typeof record?.dbKey === "string" && record.dbKey) candidateKeys.push(record.dbKey);
279
294
  if (typeof record?.privateKey === "string" && record.privateKey) candidateKeys.push(record.privateKey);
280
295
  if (typeof record?.publicKey === "string" && record.publicKey) candidateKeys.push(record.publicKey);
296
+ if (typeof record?.verifiedAgentKey === "string" && record.verifiedAgentKey) {
297
+ candidateKeys.push(record.verifiedAgentKey);
298
+ }
281
299
  if (typeof record?.id === "string" && record.id) {
282
300
  candidateKeys.push(record.id);
283
301
  candidateKeys.push(publicAgentKey(record.id));
@@ -362,12 +380,15 @@ function toSafeAgentSummary(record, options) {
362
380
  },
363
381
  options?.now ?? Date.now()
364
382
  );
383
+ const verifiedSharedKey = typeof record?.verifiedAgentKey === "string" && record.verifiedAgentKey ? record.verifiedAgentKey : void 0;
365
384
  let agentKey;
366
385
  if (currentUserId) {
367
386
  if (isOwned) {
368
387
  agentKey = ownedKey ?? (id ? ownedAgentKey(currentUserId, id) : void 0);
369
388
  } else if (publicKey) {
370
389
  agentKey = publicKey;
390
+ } else {
391
+ agentKey = verifiedSharedKey;
371
392
  }
372
393
  }
373
394
  const rawCredRef = (typeof record?.apiKeyRef === "string" && record.apiKeyRef ? record.apiKeyRef : void 0) ?? (typeof record?.credentialRef === "string" && record.credentialRef ? record.credentialRef : void 0);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generatePkcePair,
3
3
  startCallbackServer
4
- } from "./chunk-GBPZKFYK.js";
4
+ } from "./chunk-BZNGCVAW.js";
5
5
  import {
6
6
  toErrorMessage
7
7
  } from "./chunk-HNMXYYJR.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-E36HZARC.js";
4
4
  import {
5
5
  MODEL_LOOKUP_MAP
6
- } from "./chunk-UJ63UXGE.js";
6
+ } from "./chunk-MXUSPS2N.js";
7
7
  import {
8
8
  ALL_MODELS
9
9
  } from "./chunk-NG4UT4K4.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  findModelConfig,
3
3
  getProviderByModelName
4
- } from "./chunk-UJ63UXGE.js";
4
+ } from "./chunk-MXUSPS2N.js";
5
5
  import {
6
6
  asOptionalFiniteNumber
7
7
  } from "./chunk-WWC7I6TA.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clearCliLocalRuntimePreparedAgentCache
3
- } from "./chunk-XPQJXIF5.js";
3
+ } from "./chunk-GHEJJGJI.js";
4
4
  import {
5
5
  getReadableCliDb
6
6
  } from "./chunk-RXX4GDIH.js";
@@ -12,7 +12,7 @@ import {
12
12
  resolveAgentRecordFromHybridStore,
13
13
  sanitizeAgentRecordForCliOutput,
14
14
  writeAgentRecord
15
- } from "./chunk-QA6YKM3H.js";
15
+ } from "./chunk-NRALD3CC.js";
16
16
  import {
17
17
  resolveCliAgentKeyInput
18
18
  } from "./chunk-SPAQ4PVV.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildAgentRuntimeAgentLookupKeys,
3
3
  shouldFetchAgentRuntimeRecordRemotely
4
- } from "./chunk-V3ZKNK5D.js";
4
+ } from "./chunk-ZVN6I33J.js";
5
5
 
6
6
  // packages/cli/client/localAgentRecords.ts
7
7
  var buildLocalAgentLookupKeys = buildAgentRuntimeAgentLookupKeys;
@@ -11,7 +11,7 @@ import {
11
11
  getAntigravityUserAgent,
12
12
  normalizeAntigravityTokenPayload,
13
13
  refreshAntigravityToken
14
- } from "./chunk-PGSKWZCB.js";
14
+ } from "./chunk-LHDV2QUI.js";
15
15
  import {
16
16
  writeOAuthCredential
17
17
  } from "./chunk-ONXOABJR.js";