@miphamai/cli 0.19.3 → 0.19.5

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.
package/bin/mipham.ts CHANGED
@@ -241,7 +241,7 @@ async function runUpdate(): Promise<boolean> {
241
241
  }
242
242
 
243
243
  if (!latestVersion && lastError) throw lastError
244
- } catch (_err: unknown) {
244
+ } catch {
245
245
  console.log(`✗ Could not reach npm registry (network timeout)`)
246
246
  console.log()
247
247
  console.log(` Manual update:`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miphamai/cli",
3
- "version": "0.19.3",
3
+ "version": "0.19.5",
4
4
  "description": "Mipham Code — Multi-model open-core intelligent coding terminal by MiphamAI",
5
5
  "keywords": [
6
6
  "ai",
@@ -1,4 +1,4 @@
1
- import type { ProviderRegistry, ProviderInstance } from '../providers/registry'
1
+ import type { ProviderRegistry } from '../providers/registry'
2
2
  import type { ToolDefinition } from '../shared/index.ts'
3
3
  import type { SubAgentType, SubAgentOptions, AgentDefinition } from './types'
4
4
  import { createAgentContext } from './agent-context'
@@ -30,7 +30,7 @@ const STATUS_HEADERS: Record<string, { label: string; color: string }> = {
30
30
  export function AgentViewDashboard({ manager, onAttach, onExit }: DashboardProps) {
31
31
  const [selectedIndex, setSelectedIndex] = useState(0)
32
32
  const [peekingSessionId, setPeekingSessionId] = useState<string | null>(null)
33
- const [groupBy, setGroupBy] = useState<'status' | 'directory'>('status')
33
+ const [_groupBy, setGroupBy] = useState<'status' | 'directory'>('status')
34
34
 
35
35
  // Build a flat list of sessions in group order, with group headers
36
36
  const flatList = useMemo(() => {
@@ -202,7 +202,7 @@ export function AgentViewDashboard({ manager, onAttach, onExit }: DashboardProps
202
202
  ) : (
203
203
  <Box flexDirection="column">
204
204
  {/* Session list with group headers */}
205
- {flatList.map((item, flatIdx) => {
205
+ {flatList.map((item, _flatIdx) => {
206
206
  if (item.type === 'header') {
207
207
  return (
208
208
  <Box key={`h-${item.status}`} marginY={1}>
@@ -5,8 +5,7 @@
5
5
  * Handlers for: /theme, /release-notes, /ide, /terminal-setup
6
6
  */
7
7
  import type { CommandHandler } from '../ui/commands.js'
8
- import { stripIndent } from '../ui/strip-indent.js'
9
- import { NPM_INSTALL_COMMAND, NPM_UPDATE_COMMAND, PACKAGE_VERSION } from '../shared/index.ts'
8
+ import { NPM_INSTALL_COMMAND } from '../shared/index.ts'
10
9
 
11
10
  export { themeCmd, releaseNotesCmd, ideCmd, terminalSetupCmd }
12
11
 
@@ -89,7 +88,7 @@ Full changelog: https://mipham.ai/code/releases`,
89
88
  // ═══════════════════════════════════════════════════════════════
90
89
 
91
90
  const ideCmd: CommandHandler = async (_ctx) => {
92
- const { mkdirSync, writeFileSync, existsSync } = await import('node:fs')
91
+ const { mkdirSync, writeFileSync } = await import('node:fs')
93
92
  const { join } = await import('node:path')
94
93
 
95
94
  const cwd = process.cwd()
@@ -5,7 +5,6 @@
5
5
  * Handlers for: /commit, /push, /pr, /issue
6
6
  */
7
7
  import type { CommandHandler } from '../ui/commands.js'
8
- import { stripIndent } from '../ui/strip-indent.js'
9
8
 
10
9
  export { commitCmd, pushCmd, prCmd, issueCmd }
11
10
 
@@ -6,7 +6,6 @@
6
6
  * /security, /audit, /prompt-audit
7
7
  */
8
8
  import type { CommandHandler, CommandContext, CommandResult } from '../ui/commands.js'
9
- import { stripIndent } from '../ui/strip-indent.js'
10
9
 
11
10
  export { initCmd, permissionsCmd, recommendCmd, setupCmd, addDirCmd, promptAuditCmd, securityCmd }
12
11
 
@@ -135,10 +134,6 @@ const recommendCmd: CommandHandler = async (ctx) => {
135
134
  const hasRequirements = existsSync(join(cwd, 'requirements.txt'))
136
135
  const hasDockerfile = existsSync(join(cwd, 'Dockerfile'))
137
136
  const hasGitHubActions = existsSync(join(cwd, '.github', 'workflows'))
138
- const hasNextConfig =
139
- existsSync(join(cwd, 'next.config.js')) || existsSync(join(cwd, 'next.config.ts'))
140
- const hasVueConfig =
141
- existsSync(join(cwd, 'vite.config.ts')) || existsSync(join(cwd, 'vite.config.js'))
142
137
  const hasTailwind =
143
138
  existsSync(join(cwd, 'tailwind.config.ts')) || existsSync(join(cwd, 'tailwind.config.js'))
144
139
 
@@ -704,7 +699,7 @@ Permission level is controlled by /config permission <level>.`,
704
699
 
705
700
  const promptAuditCmd: CommandHandler = async () => {
706
701
  const { existsSync, readFileSync, readdirSync, statSync } = await import('node:fs')
707
- const { join, extname, basename } = await import('node:path')
702
+ const { join, basename } = await import('node:path')
708
703
  const cwd = process.cwd()
709
704
 
710
705
  // Patterns that suggest prompts written for older/less-capable models
@@ -7,7 +7,7 @@ import {
7
7
  unlinkSync,
8
8
  chmodSync,
9
9
  } from 'node:fs'
10
- import { join, dirname } from 'node:path'
10
+ import { join } from 'node:path'
11
11
  import { homedir } from 'node:os'
12
12
  import { parse as parseYaml } from 'yaml'
13
13
  import type {
@@ -1,4 +1,3 @@
1
- import { relative, isAbsolute } from 'node:path'
2
1
  import { homedir } from 'node:os'
3
2
  import type { CredentialMaskingConfig, CredentialFileRule } from '../shared/index.ts'
4
3
 
package/src/core/hooks.ts CHANGED
@@ -4,7 +4,6 @@ import type {
4
4
  HookContext,
5
5
  HookResult,
6
6
  ToolResult,
7
- HookConfig,
8
7
  } from '../shared/index.ts'
9
8
 
10
9
  /**
@@ -18,7 +18,7 @@
18
18
  */
19
19
 
20
20
  import { readdirSync, readFileSync, existsSync } from 'node:fs'
21
- import { join, relative } from 'node:path'
21
+ import { join } from 'node:path'
22
22
 
23
23
  interface RuleFile {
24
24
  name: string
@@ -146,7 +146,7 @@ export class RulesLoader {
146
146
  */
147
147
  private parseRule(
148
148
  raw: string,
149
- filename: string,
149
+ _filename: string,
150
150
  ): { paths: string[]; description: string; content: string } {
151
151
  const match = raw.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/)
152
152
  if (!match) {
package/src/mcp/oauth.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { randomBytes, createHash } from 'node:crypto'
2
+ import { exec } from 'node:child_process'
2
3
  import { createServer, Server } from 'node:http'
3
4
  import type { IncomingMessage, ServerResponse } from 'node:http'
4
5
  import type { McpServerConfig } from '../shared/types'
@@ -74,7 +75,6 @@ export class OAuthClient {
74
75
  : process.platform === 'win32'
75
76
  ? `start "" "${authUrl.toString()}"`
76
77
  : `xdg-open "${authUrl.toString()}"`
77
- const { exec } = require('node:child_process')
78
78
  exec(cmd, () => {
79
79
  /* fire-and-forget */
80
80
  })
@@ -5,7 +5,7 @@
5
5
  * from remote sources (GitHub repos, direct URLs).
6
6
  */
7
7
 
8
- import { existsSync, mkdirSync, writeFileSync, readdirSync, unlinkSync, chmodSync } from 'node:fs'
8
+ import { existsSync, mkdirSync, writeFileSync, readdirSync, unlinkSync } from 'node:fs'
9
9
  import { join } from 'node:path'
10
10
  import { homedir } from 'node:os'
11
11
  import { spawnSync } from 'node:child_process'
@@ -1,4 +1,4 @@
1
- import type { ToolDefinition, SkillDefinition, ToolResult } from '../../shared/index.ts'
1
+ import type { ToolDefinition } from '../../shared/index.ts'
2
2
  import { executeForkedSkill } from '../../skills/fork-executor'
3
3
 
4
4
  export const skillTool: ToolDefinition = {
@@ -129,7 +129,7 @@ export const enterWorktreeTool: ToolDefinition = {
129
129
  ['git', 'worktree', 'add', '-b', branchName, worktreePath, resolvedBaseRef],
130
130
  { cwd, stdout: 'pipe', stderr: 'pipe' },
131
131
  )
132
- const stdout = await new Response(proc.stdout).text()
132
+ const _stdout = await new Response(proc.stdout).text()
133
133
  const exitCode = await proc.exited
134
134
 
135
135
  if (exitCode !== 0) {
package/src/ui/app.tsx CHANGED
@@ -5,7 +5,7 @@ import type { QueryEngine } from '../core/engine'
5
5
  import type { MiphamConfig } from '../shared/index.ts'
6
6
  import type { SkillsLoader } from '../skills/loader'
7
7
  import type { PluginManager } from '../plugin/plugin-manager'
8
- import { getPreference, setPreference } from '../config/preferences'
8
+ import { setPreference } from '../config/preferences'
9
9
  import { AgentRegistry } from '../agent/agent-registry'
10
10
  import { getBackgroundAgentRegistry } from '../agent/background-registry'
11
11
  import { ChatPanel } from './chat'
@@ -133,9 +133,9 @@ export function App({
133
133
  const [providerId, setProviderId] = useState(initialProvider || config.defaultProvider)
134
134
  const [modelId, setModelId] = useState(initialModel || config.defaultModel)
135
135
  const [pickerOpen, setPickerOpen] = useState(false)
136
- const [sessionTitle, setSessionTitle] = useState('')
137
- const [fastMode, setFastMode] = useState(false)
138
- const [effort, setEffort] = useState('high')
136
+ const [_sessionTitle, setSessionTitle] = useState('')
137
+ const [_fastMode, setFastMode] = useState(false)
138
+ const [_effort, setEffort] = useState('high')
139
139
  const [focusMode, setFocusMode] = useState(false)
140
140
  const [_ultracodeMode, setUltracodeMode] = useState(false)
141
141
  const [goalText, setGoalText] = useState('')
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useMemo, useEffect } from 'react'
2
2
  import { Box, Text, useInput } from 'ink'
3
3
  import TextInput from 'ink-text-input'
4
- import { getCommandList, type CommandEntry } from './commands.js'
4
+ import { getCommandList } from './commands.js'
5
5
 
6
6
  interface CommandPickerProps {
7
7
  /** Text already typed (e.g. "/", "/age") — used as initial filter */
@@ -53,7 +53,7 @@ export function CommandPicker({
53
53
  Math.min(cursorIdx - Math.floor(maxVisible / 2), filtered.length - maxVisible),
54
54
  )
55
55
  const visible = filtered.slice(scrollStart, scrollStart + maxVisible)
56
- const adjustedCursor = cursorIdx - scrollStart
56
+ const _adjustedCursor = cursorIdx - scrollStart
57
57
 
58
58
  // Wrap cursor safely
59
59
  const safeCursor = (i: number) =>
@@ -10,7 +10,7 @@ import type { SkillsLoader } from '../skills/loader'
10
10
  import type { PluginManager } from '../plugin/plugin-manager'
11
11
  import type { Message } from '../shared/types.js'
12
12
  import { McpClient } from '../mcp/client'
13
- import { NPM_INSTALL_COMMAND, NPM_UPDATE_COMMAND, PACKAGE_VERSION } from '../shared/index.ts'
13
+ import { NPM_UPDATE_COMMAND, PACKAGE_VERSION } from '../shared/index.ts'
14
14
  import { getPreference } from '../config/preferences'
15
15
  import { stripIndent } from './strip-indent.js'
16
16
  import {
package/src/ui/input.tsx CHANGED
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef, useMemo } from 'react'
2
2
  import { Box, Text, useInput } from 'ink'
3
3
  import TextInput from 'ink-text-input'
4
4
  import { VimMotionEngine, type VimMode } from './vim-motions.js'
5
- import { getCommandList, type CommandEntry } from './commands.js'
5
+ import { getCommandList } from './commands.js'
6
6
  import { CommandPicker } from './command-picker.js'
7
7
 
8
8
  interface InputBarProps {
@@ -389,7 +389,7 @@ export function InputBar({
389
389
  {slashHints.length > 0 && vimMode === 'insert' && !pickerActive && (
390
390
  <Box marginTop={1} flexDirection="column" gap={1}>
391
391
  <Text dimColor>Commands: </Text>
392
- {slashHints.map((cmd, i) => (
392
+ {slashHints.map((cmd, _i) => (
393
393
  <Text key={cmd.name} color="cyan">
394
394
  {cmd.name}
395
395
  </Text>