opencode-navigator 0.19.3 → 0.21.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "opencode-navigator",
4
- "version": "0.19.3",
4
+ "version": "0.21.0",
5
5
  "description": "Search, navigate, and manage OpenCode sessions from the TUI",
6
6
  "type": "module",
7
7
  "packageManager": "bun@1.4.2",
@@ -32,12 +32,15 @@
32
32
  "assets",
33
33
  "scripts/install-font.mjs",
34
34
  "scripts/update-local-snapshot.mjs",
35
+ "scripts/save-project-profile.mjs",
35
36
  "README.md",
37
+ "PROVIDERS.md",
36
38
  "CHANGELOG.md",
37
39
  "LICENSE"
38
40
  ],
39
41
  "bin": {
40
- "opencode-navigator-font": "scripts/install-font.mjs"
42
+ "opencode-navigator-font": "scripts/install-font.mjs",
43
+ "opencode-navigator-profile": "scripts/save-project-profile.mjs"
41
44
  },
42
45
  "exports": {
43
46
  "./tui": {
@@ -59,14 +62,13 @@
59
62
  "scripts": {
60
63
  "build": "bun run build.ts",
61
64
  "bundle:size": "bun run build && bun run scripts/check-bundle-size.ts",
62
- "format": "prettier --write --ignore-unknown .",
63
- "format:check": "prettier --check --ignore-unknown .",
65
+ "format": "oxfmt --write .",
66
+ "format:check": "oxfmt --check .",
64
67
  "font:install": "node scripts/install-font.mjs",
65
68
  "font:build": "uv run scripts/generate-corner-font.py",
66
69
  "font:check": "uv run scripts/generate-corner-font.py --check",
67
- "lint": "bun run lint:eslint",
68
- "lint:eslint": "eslint . --max-warnings 0",
69
- "lint:fix": "eslint . --fix && bun run format",
70
+ "lint": "oxlint . --deny-warnings",
71
+ "lint:fix": "oxlint . --fix --deny-warnings && bun run format",
70
72
  "prepublishOnly": "bun run check",
71
73
  "screenshots": "bash scripts/capture-screenshots.sh",
72
74
  "screenshots:verify": "bash scripts/capture-screenshots.sh --verify",
@@ -108,14 +110,17 @@
108
110
  "@opentui/core": "0.5.12",
109
111
  "@opentui/keymap": "0.5.12",
110
112
  "@opentui/solid": "0.5.12",
111
- "@st1ggy/linter-config": "7.3.1",
113
+ "@st1ggy/linter-config": "8.0.0",
112
114
  "@types/bun": "1.4.2",
113
- "eslint": "10.8.0",
114
- "eslint-config-prettier": "10.1.8",
115
115
  "eslint-plugin-solid": "0.18.0",
116
- "prettier": "3.9.6",
116
+ "oxfmt": "0.72.0",
117
+ "oxlint": "1.87.0",
118
+ "oxlint-tsgolint": "7.0.2003",
117
119
  "solid-js": "1.9.15",
118
120
  "typescript": "6.0.3",
119
121
  "web-tree-sitter": "0.25.10"
122
+ },
123
+ "optionalDependencies": {
124
+ "@github/copilot-sdk": "1.0.16"
120
125
  }
121
126
  }
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ // This entrypoint is built before packaging; resolve it at runtime from the published dist directory.
3
+ const modulePath = '../dist/project-profile.js'
4
+ const { previewProjectProfile, saveProjectProfile } = await import(modulePath)
5
+
6
+ const [command, name, ...flags] = process.argv.slice(2)
7
+
8
+ if (command !== 'save' || !name || flags.some((flag) => flag !== '--apply' && flag !== '--replace')) {
9
+ console.error('Usage: opencode-navigator-profile save <name> [--apply] [--replace] < portable-settings.json')
10
+ process.exitCode = 1
11
+ } else if (process.stdin.isTTY) {
12
+ console.error('Paste the JSON exported by Navigator through standard input.')
13
+ process.exitCode = 1
14
+ } else {
15
+ try {
16
+ let source = ''
17
+
18
+ for await (const chunk of process.stdin) {
19
+ source += chunk.toString()
20
+
21
+ if (source.length > 1_000_000) throw new Error('Portable settings exceed 1 MB')
22
+ }
23
+ const preview = await previewProjectProfile(process.cwd(), name, source, flags.includes('--replace'))
24
+
25
+ console.log(`Project profile: ${preview.name}`)
26
+ console.log(`Target: ${preview.file}`)
27
+ console.log(
28
+ `Layout: ${Object.keys(preview.layout.sections).length} sections, ${Object.keys(preview.layout.expanded).length} expansions`,
29
+ )
30
+ console.log(`MCP: ${Object.keys(preview.mcp ?? {}).length} server states`)
31
+ for (const path of preview.skipped) console.log(`Skipped unsupported field: ${path}`)
32
+
33
+ if (flags.includes('--apply')) {
34
+ await saveProjectProfile(preview, process.cwd())
35
+ console.log('Saved. Restart OpenCode to load the project profile, then preview it from Settings → Presets.')
36
+ } else console.log('Preview only. Repeat with --apply to save this profile.')
37
+ } catch (error) {
38
+ console.error(error instanceof Error ? error.message : String(error))
39
+ process.exitCode = 1
40
+ }
41
+ }
@@ -60,7 +60,8 @@ export async function updateLocalSnapshot(wrapper, target, operations = {}) {
60
60
  if (target === version) return
61
61
 
62
62
  await validate(previous, version)
63
- const dependencies = JSON.parse(await readFile(join(previous, 'package.json'), 'utf8')).dependencies
63
+ const previousMetadata = JSON.parse(await readFile(join(previous, 'package.json'), 'utf8'))
64
+ const dependencies = previousMetadata.dependencies
64
65
 
65
66
  if (!dependencies?.['@opentui/core'] || !dependencies['@opentui/solid'] || !dependencies['solid-js'])
66
67
  throw new Error('Pinned Navigator runtime dependencies are missing')
@@ -99,20 +100,21 @@ export async function updateLocalSnapshot(wrapper, target, operations = {}) {
99
100
  private: true,
100
101
  type: 'module',
101
102
  dependencies,
103
+ optionalDependencies: { ...previousMetadata.optionalDependencies, ...metadata.optionalDependencies },
102
104
  }),
103
105
  )
104
106
 
105
- if (operations.install) await operations.install(staging)
106
- else
107
- await command('npm', [
108
- 'install',
109
- '--prefix',
110
- staging,
111
- '--omit=dev',
112
- '--ignore-scripts',
113
- '--no-package-lock',
114
- '--legacy-peer-deps',
115
- ])
107
+ await (operations.install
108
+ ? operations.install(staging)
109
+ : command('npm', [
110
+ 'install',
111
+ '--prefix',
112
+ staging,
113
+ '--omit=dev',
114
+ '--ignore-scripts',
115
+ '--no-package-lock',
116
+ '--legacy-peer-deps',
117
+ ]))
116
118
 
117
119
  await validate(staging, target)
118
120