@agentuity/cli 1.0.31 → 1.0.32

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 (102) hide show
  1. package/dist/agent-detection.js +1 -1
  2. package/dist/agent-detection.js.map +1 -1
  3. package/dist/api.d.ts +1 -1
  4. package/dist/api.d.ts.map +1 -1
  5. package/dist/api.js +1 -1
  6. package/dist/api.js.map +1 -1
  7. package/dist/cache/agent-intro.d.ts.map +1 -1
  8. package/dist/cache/agent-intro.js.map +1 -1
  9. package/dist/cache/resource-region.d.ts.map +1 -1
  10. package/dist/cache/resource-region.js.map +1 -1
  11. package/dist/cache/user-cache.d.ts.map +1 -1
  12. package/dist/cache/user-cache.js.map +1 -1
  13. package/dist/cmd/ai/opencode/install.js +1 -1
  14. package/dist/cmd/ai/opencode/install.js.map +1 -1
  15. package/dist/cmd/build/ast.js +2 -2
  16. package/dist/cmd/build/ast.js.map +1 -1
  17. package/dist/cmd/build/patch/_util.d.ts +1 -1
  18. package/dist/cmd/build/patch/_util.d.ts.map +1 -1
  19. package/dist/cmd/build/patch/_util.js +2 -2
  20. package/dist/cmd/build/patch/_util.js.map +1 -1
  21. package/dist/cmd/build/vite/bun-dev-server.js +9 -1
  22. package/dist/cmd/build/vite/bun-dev-server.js.map +1 -1
  23. package/dist/cmd/build/vite/config-loader.js +9 -1
  24. package/dist/cmd/build/vite/config-loader.js.map +1 -1
  25. package/dist/cmd/build/vite/registry-generator.js.map +1 -1
  26. package/dist/cmd/build/vite/server-bundler.js +9 -1
  27. package/dist/cmd/build/vite/server-bundler.js.map +1 -1
  28. package/dist/cmd/build/vite/static-renderer.js +11 -3
  29. package/dist/cmd/build/vite/static-renderer.js.map +1 -1
  30. package/dist/cmd/build/vite/vite-asset-server-config.js +9 -1
  31. package/dist/cmd/build/vite/vite-asset-server-config.js.map +1 -1
  32. package/dist/cmd/build/vite/vite-asset-server.js +9 -1
  33. package/dist/cmd/build/vite/vite-asset-server.js.map +1 -1
  34. package/dist/cmd/build/vite/vite-builder.js +10 -2
  35. package/dist/cmd/build/vite/vite-builder.js.map +1 -1
  36. package/dist/cmd/build/vite/workbench-generator.d.ts +1 -1
  37. package/dist/cmd/build/vite/workbench-generator.d.ts.map +1 -1
  38. package/dist/cmd/build/vite/workbench-generator.js +1 -1
  39. package/dist/cmd/build/vite/workbench-generator.js.map +1 -1
  40. package/dist/cmd/cloud/keyvalue/repl.d.ts.map +1 -1
  41. package/dist/cmd/cloud/keyvalue/repl.js +4 -2
  42. package/dist/cmd/cloud/keyvalue/repl.js.map +1 -1
  43. package/dist/cmd/cloud/keyvalue/search.d.ts.map +1 -1
  44. package/dist/cmd/cloud/keyvalue/search.js.map +1 -1
  45. package/dist/cmd/cloud/sandbox/cp.js +2 -2
  46. package/dist/cmd/cloud/sandbox/cp.js.map +1 -1
  47. package/dist/cmd/cloud/storage/config.d.ts.map +1 -1
  48. package/dist/cmd/cloud/storage/config.js +1 -2
  49. package/dist/cmd/cloud/storage/config.js.map +1 -1
  50. package/dist/cmd/cloud/storage/list.d.ts.map +1 -1
  51. package/dist/cmd/cloud/storage/list.js.map +1 -1
  52. package/dist/cmd/cloud/task/delete.d.ts.map +1 -1
  53. package/dist/cmd/cloud/task/delete.js +6 -1
  54. package/dist/cmd/cloud/task/delete.js.map +1 -1
  55. package/dist/cmd/dev/dev-lock.js +2 -2
  56. package/dist/cmd/dev/dev-lock.js.map +1 -1
  57. package/dist/cmd/dev/templates.d.ts.map +1 -1
  58. package/dist/cmd/dev/templates.js +0 -1
  59. package/dist/cmd/dev/templates.js.map +1 -1
  60. package/dist/cmd/project/download.js +1 -1
  61. package/dist/cmd/project/download.js.map +1 -1
  62. package/dist/domain.js +1 -1
  63. package/dist/domain.js.map +1 -1
  64. package/dist/schema-generator.d.ts +1 -1
  65. package/dist/schema-generator.d.ts.map +1 -1
  66. package/dist/schema-generator.js +1 -1
  67. package/dist/schema-generator.js.map +1 -1
  68. package/dist/schema-parser.js +1 -1
  69. package/dist/schema-parser.js.map +1 -1
  70. package/dist/terminal.d.ts.map +1 -1
  71. package/dist/terminal.js +12 -17
  72. package/dist/terminal.js.map +1 -1
  73. package/dist/tui.js +1 -1
  74. package/dist/tui.js.map +1 -1
  75. package/dist/utils/date.js +1 -1
  76. package/dist/utils/date.js.map +1 -1
  77. package/package.json +6 -6
  78. package/src/agent-detection.ts +1 -1
  79. package/src/api.ts +1 -1
  80. package/src/cache/agent-intro.ts +3 -4
  81. package/src/cache/resource-region.ts +3 -1
  82. package/src/cache/user-cache.ts +3 -4
  83. package/src/cmd/ai/opencode/install.ts +1 -1
  84. package/src/cmd/build/ast.ts +2 -2
  85. package/src/cmd/build/patch/_util.ts +2 -2
  86. package/src/cmd/build/vite/registry-generator.ts +4 -4
  87. package/src/cmd/build/vite/workbench-generator.ts +1 -1
  88. package/src/cmd/cloud/keyvalue/repl.ts +6 -2
  89. package/src/cmd/cloud/keyvalue/search.ts +2 -1
  90. package/src/cmd/cloud/sandbox/cp.ts +2 -2
  91. package/src/cmd/cloud/storage/config.ts +3 -8
  92. package/src/cmd/cloud/storage/list.ts +8 -3
  93. package/src/cmd/cloud/task/delete.ts +13 -2
  94. package/src/cmd/dev/dev-lock.ts +2 -2
  95. package/src/cmd/dev/templates.ts +0 -1
  96. package/src/cmd/project/download.ts +1 -1
  97. package/src/domain.ts +3 -3
  98. package/src/schema-generator.ts +1 -1
  99. package/src/schema-parser.ts +1 -1
  100. package/src/terminal.ts +12 -14
  101. package/src/tui.ts +1 -1
  102. package/src/utils/date.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentuity/cli",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Agentuity employees and contributors",
6
6
  "type": "module",
@@ -41,9 +41,9 @@
41
41
  "prepublishOnly": "bun run clean && bun run build"
42
42
  },
43
43
  "dependencies": {
44
- "@agentuity/auth": "1.0.31",
45
- "@agentuity/core": "1.0.31",
46
- "@agentuity/server": "1.0.31",
44
+ "@agentuity/auth": "1.0.32",
45
+ "@agentuity/core": "1.0.32",
46
+ "@agentuity/server": "1.0.32",
47
47
  "@datasert/cronjs-parser": "^1.4.0",
48
48
  "@vitejs/plugin-react": "^5.1.2",
49
49
  "acorn-loose": "^8.5.2",
@@ -60,10 +60,10 @@
60
60
  "typescript": "^5.9.0",
61
61
  "vite": "^7.2.7",
62
62
  "zod": "^4.3.5",
63
- "@agentuity/frontend": "1.0.31"
63
+ "@agentuity/frontend": "1.0.32"
64
64
  },
65
65
  "devDependencies": {
66
- "@agentuity/test-utils": "1.0.31",
66
+ "@agentuity/test-utils": "1.0.32",
67
67
  "@types/adm-zip": "^0.5.7",
68
68
  "@types/bun": "latest",
69
69
  "@types/tar-fs": "^2.0.4",
@@ -294,7 +294,7 @@ function initLinuxFFI(): FFIFunctions {
294
294
  const ppidField = fields[1]; // ppid is 2nd field after state
295
295
  if (!ppidField) return null;
296
296
  const ppid = parseInt(ppidField, 10);
297
- return isNaN(ppid) || ppid <= 1 ? null : ppid;
297
+ return Number.isNaN(ppid) || ppid <= 1 ? null : ppid;
298
298
  } catch {
299
299
  // Ignore errors
300
300
  }
package/src/api.ts CHANGED
@@ -93,7 +93,7 @@ export function getAppBaseURL(config?: Config | null): string {
93
93
  return baseGetAppBaseURL(config?.name, overrides);
94
94
  }
95
95
 
96
- export function getGravityDevModeURL(region: string, config?: Config | null): string {
96
+ export function getGravityDevModeURL(_region: string, config?: Config | null): string {
97
97
  const overrides = config?.overrides as { gravity_url?: string } | undefined;
98
98
  if (overrides?.gravity_url) {
99
99
  return overrides.gravity_url;
@@ -33,10 +33,9 @@ function getDatabase(): Database {
33
33
  export function hasAgentSeenIntro(agentId: string): boolean {
34
34
  try {
35
35
  const row = getDatabase()
36
- .query<
37
- { agent_id: string },
38
- [string]
39
- >('SELECT agent_id FROM agent_intro_seen WHERE agent_id = ?')
36
+ .query<{ agent_id: string }, [string]>(
37
+ 'SELECT agent_id FROM agent_intro_seen WHERE agent_id = ?'
38
+ )
40
39
  .get(agentId);
41
40
  return row !== null;
42
41
  } catch {
@@ -92,7 +92,9 @@ export async function getResourceInfo(
92
92
  .query<
93
93
  { region: string; org_id: string | null; project_id: string | null; last_updated: number },
94
94
  [string, string, string]
95
- >('SELECT region, org_id, project_id, last_updated FROM resource_region_cache WHERE resource_type = ? AND profile = ? AND id = ?')
95
+ >(
96
+ 'SELECT region, org_id, project_id, last_updated FROM resource_region_cache WHERE resource_type = ? AND profile = ? AND id = ?'
97
+ )
96
98
  .get(type, profile, id);
97
99
 
98
100
  if (!row) {
@@ -37,10 +37,9 @@ export function getCachedUserInfo(
37
37
  ): { userId: string; firstName: string; lastName: string } | null {
38
38
  try {
39
39
  const row = getDatabase()
40
- .query<
41
- { user_id: string; first_name: string; last_name: string },
42
- [string]
43
- >('SELECT user_id, first_name, last_name FROM user_info_cache WHERE profile = ?')
40
+ .query<{ user_id: string; first_name: string; last_name: string }, [string]>(
41
+ 'SELECT user_id, first_name, last_name FROM user_info_cache WHERE profile = ?'
42
+ )
44
43
  .get(profile);
45
44
  if (!row) return null;
46
45
  return {
@@ -56,7 +56,7 @@ export const installSubcommand = createSubcommand({
56
56
  const hasExactEntry = openCodeConfig.plugin.includes(pluginEntry);
57
57
 
58
58
  // Check if there's an existing entry that needs updating
59
- const existingIndex = openCodeConfig.plugin.findIndex((p) => p === '@agentuity/opencode');
59
+ const existingIndex = openCodeConfig.plugin.indexOf('@agentuity/opencode');
60
60
 
61
61
  if (hasExactEntry) {
62
62
  if (!jsonMode) {
@@ -1269,9 +1269,9 @@ function extractValidatorSchemas(callExpr: ASTCallExpression): {
1269
1269
  if (unary.argument?.type === 'Identifier') {
1270
1270
  const identifier = unary.argument as ASTNodeIdentifier;
1271
1271
  if (identifier.name === 'true') {
1272
- result.stream = unary.operator === '!' ? false : true;
1272
+ result.stream = unary.operator !== '!';
1273
1273
  } else if (identifier.name === 'false') {
1274
- result.stream = unary.operator === '!' ? true : false;
1274
+ result.stream = unary.operator === '!';
1275
1275
  }
1276
1276
  }
1277
1277
  }
@@ -43,7 +43,7 @@ ${inject}
43
43
 
44
44
  export function generateGatewayEnvGuard(
45
45
  apikey: string,
46
- apikeyval: string,
46
+ _apikeyval: string,
47
47
  apibase: string,
48
48
  provider: string
49
49
  ): string {
@@ -63,7 +63,7 @@ export function generateGatewayEnvGuard(
63
63
 
64
64
  export function searchBackwards(contents: string, offset: number, val: string): number {
65
65
  for (let i = offset; i >= 0; i--) {
66
- if (contents.charAt(i) == val) {
66
+ if (contents.charAt(i) === val) {
67
67
  return i;
68
68
  }
69
69
  }
@@ -1067,11 +1067,11 @@ export async function generateRouteRegistry(
1067
1067
  const generatedContent = `// @generated
1068
1068
  // Auto-generated by Agentuity - DO NOT EDIT
1069
1069
  ${importsStr}${typeImports}${
1070
- shouldEmitFrontendClient
1071
- ? `
1070
+ shouldEmitFrontendClient
1071
+ ? `
1072
1072
  import { createClient } from '@agentuity/frontend';`
1073
- : ''
1074
- }
1073
+ : ''
1074
+ }
1075
1075
  // ============================================================================
1076
1076
  // Route Schema Type Exports
1077
1077
  // ============================================================================
@@ -99,7 +99,7 @@ function generateIndexHtml(): string {
99
99
  */
100
100
  export async function generateWorkbenchFiles(
101
101
  rootDir: string,
102
- projectId: string,
102
+ _projectId: string,
103
103
  config: WorkbenchConfig,
104
104
  logger: Logger
105
105
  ): Promise<void> {
@@ -52,7 +52,8 @@ export const replSubcommand = createCommand({
52
52
  const contentType = isPossiblyJSON(ctx.parsed.args[2]!)
53
53
  ? 'application/json'
54
54
  : 'text/plain';
55
- const ttl = ctx.parsed.args.length > 3 ? parseInt(ctx.parsed.args[3]!) : undefined;
55
+ const ttl =
56
+ ctx.parsed.args.length > 3 ? parseInt(ctx.parsed.args[3]!, 10) : undefined;
56
57
  await storage.set(ctx.parsed.args[0]!, ctx.parsed.args[1]!, ctx.parsed.args[2]!, {
57
58
  contentType,
58
59
  ttl,
@@ -172,7 +173,10 @@ export const replSubcommand = createCommand({
172
173
  const item = results[key];
173
174
  if (!item) continue;
174
175
  const sizeMB = (item.size / (1024 * 1024)).toFixed(2);
175
- const date = item.lastUsed != null ? new Date(item.lastUsed).toLocaleString() : 'unknown';
176
+ const date =
177
+ item.lastUsed != null
178
+ ? new Date(item.lastUsed).toLocaleString()
179
+ : 'unknown';
176
180
  ctx.write(
177
181
  ` ${tui.bold(key)}: ${sizeMB} MB, ${item.contentType}, updated ${date}`
178
182
  );
@@ -58,7 +58,8 @@ export const searchSubcommand = createCommand({
58
58
  const item = results[key];
59
59
  if (!item) continue;
60
60
  const sizeMB = (item.size / (1024 * 1024)).toFixed(2);
61
- const date = item.lastUsed != null ? new Date(item.lastUsed).toLocaleString() : 'unknown';
61
+ const date =
62
+ item.lastUsed != null ? new Date(item.lastUsed).toLocaleString() : 'unknown';
62
63
  tui.info(` ${tui.bold(key)}: ${sizeMB} MB, ${item.contentType}, updated ${date}`);
63
64
  }
64
65
  }
@@ -209,7 +209,7 @@ async function uploadToSandbox(
209
209
 
210
210
  async function uploadSingleFile(
211
211
  client: APIClient,
212
- logger: Logger,
212
+ _logger: Logger,
213
213
  orgId: string,
214
214
  sandboxId: string,
215
215
  resolvedPath: string,
@@ -327,7 +327,7 @@ async function downloadFromSandbox(
327
327
 
328
328
  async function downloadSingleFile(
329
329
  client: APIClient,
330
- logger: Logger,
330
+ _logger: Logger,
331
331
  orgId: string,
332
332
  sandboxId: string,
333
333
  remotePath: string,
@@ -18,20 +18,15 @@ import { getResourceInfo, setResourceInfo } from '../../../cache';
18
18
  function displayConfig(config: BucketConfig) {
19
19
  tui.newline();
20
20
  console.log(tui.bold('Bucket: ') + config.bucket_name);
21
+ console.log(tui.bold('Storage Tier: ') + (config.storage_tier ?? tui.muted('default')));
21
22
  console.log(
22
- tui.bold('Storage Tier: ') + (config.storage_tier ?? tui.muted('default'))
23
- );
24
- console.log(
25
- tui.bold('TTL: ') +
26
- (config.ttl != null ? `${config.ttl}s` : tui.muted('default'))
23
+ tui.bold('TTL: ') + (config.ttl != null ? `${config.ttl}s` : tui.muted('default'))
27
24
  );
28
25
  console.log(
29
26
  tui.bold('Public: ') +
30
27
  (config.public != null ? String(config.public) : tui.muted('default'))
31
28
  );
32
- console.log(
33
- tui.bold('Cache Control: ') + (config.cache_control ?? tui.muted('default'))
34
- );
29
+ console.log(tui.bold('Cache Control: ') + (config.cache_control ?? tui.muted('default')));
35
30
 
36
31
  if (config.cors) {
37
32
  console.log(tui.bold('CORS:'));
@@ -260,15 +260,20 @@ export const listSubcommand = createSubcommand({
260
260
  if (s3.region) console.log(` Region: ${tui.muted(s3.region)}`);
261
261
  if (s3.endpoint) console.log(` Endpoint: ${tui.muted(s3.endpoint)}`);
262
262
  if (s3.object_count != null) {
263
- const sizeStr = s3.total_size != null ? tui.formatBytes(s3.total_size) : 'unknown';
264
- console.log(` Objects: ${tui.muted(`${s3.object_count.toLocaleString()} (${sizeStr})`)}`);
263
+ const sizeStr =
264
+ s3.total_size != null ? tui.formatBytes(s3.total_size) : 'unknown';
265
+ console.log(
266
+ ` Objects: ${tui.muted(`${s3.object_count.toLocaleString()} (${sizeStr})`)}`
267
+ );
265
268
  }
266
269
  if (s3.last_event_at) {
267
270
  const date = new Date(s3.last_event_at);
268
271
  if (Number.isNaN(date.getTime())) {
269
272
  console.log(` Activity: ${tui.muted('unknown')}`);
270
273
  } else {
271
- console.log(` Activity: ${tui.muted(date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric', hour: '2-digit', minute: '2-digit' }))}`);
274
+ console.log(
275
+ ` Activity: ${tui.muted(date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric', hour: '2-digit', minute: '2-digit' }))}`
276
+ );
272
277
  }
273
278
  }
274
279
  tui.newline();
@@ -125,7 +125,12 @@ export const deleteSubcommand = createCommand({
125
125
  // Determine mode: single delete or batch delete
126
126
  const isSingleDelete = !!args.id;
127
127
  const hasFilters =
128
- opts.status || opts.type || opts.priority || opts.olderThan || opts.parentId || opts.createdId;
128
+ opts.status ||
129
+ opts.type ||
130
+ opts.priority ||
131
+ opts.olderThan ||
132
+ opts.parentId ||
133
+ opts.createdId;
129
134
 
130
135
  if (!isSingleDelete && !hasFilters) {
131
136
  tui.fatal(
@@ -246,7 +251,13 @@ export const deleteSubcommand = createCommand({
246
251
  tui.newline();
247
252
 
248
253
  const tableData = candidates.map(
249
- (task: { id: string; title: string; status: string; type: string; created_at: string }) => ({
254
+ (task: {
255
+ id: string;
256
+ title: string;
257
+ status: string;
258
+ type: string;
259
+ created_at: string;
260
+ }) => ({
250
261
  ID: tui.muted(truncate(task.id, 28)),
251
262
  Title: truncate(task.title, 40),
252
263
  Status: task.status,
@@ -205,7 +205,7 @@ async function cleanupStaleLock(
205
205
  */
206
206
  async function ensureNoActiveDevForProject(
207
207
  rootDir: string,
208
- port: number,
208
+ _port: number,
209
209
  logger: LoggerLike
210
210
  ): Promise<void> {
211
211
  const lockPath = getLockPath(rootDir);
@@ -214,7 +214,7 @@ async function ensureNoActiveDevForProject(
214
214
 
215
215
  const now = Date.now();
216
216
  const createdAt = Date.parse(existing.createdAt || '');
217
- const ageMs = isFinite(createdAt) ? now - createdAt : Infinity;
217
+ const ageMs = Number.isFinite(createdAt) ? now - createdAt : Infinity;
218
218
 
219
219
  const mainAlive = pidExists(existing.mainPid);
220
220
 
@@ -35,7 +35,6 @@ export default router;
35
35
 
36
36
  const invalidDirRegex = /[<>:"/\\|?*]/;
37
37
 
38
- // biome-ignore lint/suspicious/noControlCharactersInRegex: checking for invalid control characters in directory names
39
38
  const invalidControlChars = /[\u0000-\u001F]/;
40
39
  const reservedWindowsNames = /^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i;
41
40
  const invalidTrailing = /[. ]$/;
@@ -275,7 +275,7 @@ export async function downloadTemplate(options: DownloadOptions): Promise<void>
275
275
  },
276
276
  // ignore callback: called AFTER map, receives the MAPPED name
277
277
  // Return true to skip the entry, false to extract it
278
- ignore: (name: string, header?: Headers) => {
278
+ ignore: (_name: string, header?: Headers) => {
279
279
  if (!header) {
280
280
  ignoredCount++;
281
281
  return true;
package/src/domain.ts CHANGED
@@ -54,7 +54,7 @@ export function isPending(x: DNSResult): x is DNSPending {
54
54
  }
55
55
 
56
56
  export function isSuccess(x: DNSResult): x is DNSSuccess {
57
- return x.success == true && !('pending' in x) && !('error' in x) && !('misconfigured' in x);
57
+ return x.success === true && !('pending' in x) && !('error' in x) && !('misconfigured' in x);
58
58
  }
59
59
 
60
60
  const timeoutMs = 5000;
@@ -195,8 +195,8 @@ export async function checkCustomDomainForDNS(
195
195
  if (timeoutId) clearTimeout(timeoutId);
196
196
  });
197
197
 
198
- if (result) {
199
- if (result === proxy) {
198
+ if (result) {
199
+ if (result === proxy) {
200
200
  // DNS is correct — verify TLS certificate (also triggers Let's Encrypt provisioning)
201
201
  const tlsValid = await checkTLSCertificate(domain);
202
202
  if (tlsValid) {
@@ -290,7 +290,7 @@ function extractSubcommandSchema(def: SubcommandDefinition): SchemaCommand {
290
290
  * Generate JSON schema for the entire CLI
291
291
  */
292
292
  export function generateCLISchema(
293
- program: Command,
293
+ _program: Command,
294
294
  commands: CommandDefinition[],
295
295
  version: string
296
296
  ): CLISchema {
@@ -421,7 +421,7 @@ export async function buildValidationInputAsync(
421
421
  if (schemas.options && !options?.usesStdin) {
422
422
  // Use getShape() instead of parseOptionsSchema() to avoid re-evaluating function defaults
423
423
  const shape = getShape(schemas.options);
424
- const hasConfirmOption = Object.prototype.hasOwnProperty.call(shape, 'confirm');
424
+ const hasConfirmOption = Object.hasOwn(shape, 'confirm');
425
425
  const confirmValue = result.options.confirm;
426
426
 
427
427
  if (hasConfirmOption && confirmValue === undefined) {
package/src/terminal.ts CHANGED
@@ -31,9 +31,8 @@ export async function detectColorScheme(): Promise<ColorScheme> {
31
31
  `[DEBUG] OSC 11 response: rgb(${bgColor.r},${bgColor.g},${bgColor.b}), luminance: ${luminance.toFixed(2)}, scheme: ${scheme}`
32
32
  );
33
33
  return scheme;
34
- } else {
35
- if (debug) console.log('[DEBUG] OSC 11 query timed out or no response');
36
34
  }
35
+ if (debug) console.log('[DEBUG] OSC 11 query timed out or no response');
37
36
  } catch (error) {
38
37
  if (debug) console.log('[DEBUG] OSC 11 query failed:', error);
39
38
  }
@@ -44,8 +43,8 @@ export async function detectColorScheme(): Promise<ColorScheme> {
44
43
  // COLORFGBG format is "foreground;background"
45
44
  // This is unreliable but better than nothing
46
45
  const parts = process.env.COLORFGBG.split(';');
47
- const fg = parseInt(parts[0] || '7', 10);
48
- const bg = parseInt(parts[1] || '0', 10);
46
+ const fg = Number.parseInt(parts[0] || '7', 10);
47
+ const bg = Number.parseInt(parts[1] || '0', 10);
49
48
 
50
49
  // Heuristic: if background is 0 (black) and foreground is light (>=7), it's likely dark mode
51
50
  // if background is light (>=7) and foreground is dark (<7), it's likely light mode
@@ -88,7 +87,6 @@ async function queryTerminalBackground(): Promise<RGBColor | null> {
88
87
  // Pattern 1: ESC ] 11 ; rgb:RRRR/GGGG/BBBB ESC \ (xterm with ESC \ terminator)
89
88
  // Pattern 2: ESC ] 11 ; rgb:RRRR/GGGG/BBBB BEL (xterm with BEL terminator)
90
89
  // The color values can be 8-bit (RR), 12-bit (RRR), or 16-bit (RRRR)
91
- // biome-ignore lint/suspicious/noControlCharactersInRegex: Control characters needed for ANSI escape sequences
92
90
  const match = response.match(
93
91
  // eslint-disable-next-line no-control-regex
94
92
  /\x1b\]11;rgb:([0-9a-f]+)\/([0-9a-f]+)\/([0-9a-f]+)(?:\x1b\\|\x07)/i
@@ -103,14 +101,14 @@ async function queryTerminalBackground(): Promise<RGBColor | null> {
103
101
  if (!hex) return 0;
104
102
  if (hex.length === 4) {
105
103
  // 16-bit: RRRR -> take first 2 chars
106
- return parseInt(hex.slice(0, 2), 16);
107
- } else if (hex.length === 3) {
104
+ return Number.parseInt(hex.slice(0, 2), 16);
105
+ }
106
+ if (hex.length === 3) {
108
107
  // 12-bit: RRR -> take first 2 chars
109
- return parseInt(hex.slice(0, 2), 16);
110
- } else {
111
- // 8-bit: RR
112
- return parseInt(hex, 16);
108
+ return Number.parseInt(hex.slice(0, 2), 16);
113
109
  }
110
+ // 8-bit: RR
111
+ return Number.parseInt(hex, 16);
114
112
  };
115
113
 
116
114
  const r = parseColorValue(match[1]);
@@ -145,9 +143,9 @@ function calculateLuminance(color: RGBColor): number {
145
143
  const gsRGB = color.g / 255;
146
144
  const bsRGB = color.b / 255;
147
145
 
148
- const r = rsRGB <= 0.03928 ? rsRGB / 12.92 : Math.pow((rsRGB + 0.055) / 1.055, 2.4);
149
- const g = gsRGB <= 0.03928 ? gsRGB / 12.92 : Math.pow((gsRGB + 0.055) / 1.055, 2.4);
150
- const b = bsRGB <= 0.03928 ? bsRGB / 12.92 : Math.pow((bsRGB + 0.055) / 1.055, 2.4);
146
+ const r = rsRGB <= 0.03928 ? rsRGB / 12.92 : ((rsRGB + 0.055) / 1.055) ** 2.4;
147
+ const g = gsRGB <= 0.03928 ? gsRGB / 12.92 : ((gsRGB + 0.055) / 1.055) ** 2.4;
148
+ const b = bsRGB <= 0.03928 ? bsRGB / 12.92 : ((bsRGB + 0.055) / 1.055) ** 2.4;
151
149
 
152
150
  return 0.2126 * r + 0.7152 * g + 0.0722 * b;
153
151
  }
package/src/tui.ts CHANGED
@@ -130,7 +130,7 @@ export function getTerminalWidth(defaultWidth = 80): number {
130
130
  }
131
131
  if (process.env.COLUMNS) {
132
132
  const cols = parseInt(process.env.COLUMNS, 10);
133
- if (!isNaN(cols) && cols > 0) {
133
+ if (!Number.isNaN(cols) && cols > 0) {
134
134
  return cols;
135
135
  }
136
136
  }
package/src/utils/date.ts CHANGED
@@ -19,7 +19,7 @@ export function parseExpiresAt(input: string): string {
19
19
  if (input.includes('T') || input.includes('-')) {
20
20
  // Validate it's a valid date
21
21
  const date = new Date(input);
22
- if (isNaN(date.getTime())) {
22
+ if (Number.isNaN(date.getTime())) {
23
23
  throw new InvalidDateFormatError({ input, message: `Invalid date format: ${input}` });
24
24
  }
25
25
  return date.toISOString();