gemiterm 2.0.0 → 2.1.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 (155) hide show
  1. package/README.md +32 -9
  2. package/package.json +13 -4
  3. package/src/cli/command-registry.ts +66 -62
  4. package/src/cli/commands/continue-command.ts +75 -1
  5. package/src/cli/commands/install-skills-command.ts +35 -0
  6. package/src/cli/commands/new-command.ts +62 -0
  7. package/src/cli/index.ts +19 -44
  8. package/src/cli/utils/long-arg-guard.ts +28 -0
  9. package/src/cli/utils/prompt-file.ts +26 -0
  10. package/src/infrastructure/cli-parser.ts +77 -0
  11. package/src/infrastructure/io.ts +9 -0
  12. package/src/services/skills-cli-driver.ts +58 -0
  13. package/src/services/skills-service.ts +52 -0
  14. package/.env +0 -2
  15. package/.github/workflows/manual-release.yml +0 -34
  16. package/.github/workflows/release.yml +0 -198
  17. package/.github/workflows/test.yml +0 -29
  18. package/.opencode/commands/opsx-apply.md +0 -152
  19. package/.opencode/commands/opsx-archive.md +0 -157
  20. package/.opencode/commands/opsx-explore.md +0 -169
  21. package/.opencode/commands/opsx-propose.md +0 -104
  22. package/.opencode/commands/opsx-sync.md +0 -140
  23. package/.opencode/commands/search-intelligently.md +0 -9
  24. package/.opencode/opencode.json +0 -20
  25. package/.opencode/skills/intellisearch/.version +0 -1
  26. package/.opencode/skills/intellisearch/SKILL.md +0 -84
  27. package/.opencode/skills/intellisearch/references/brave-search.md +0 -67
  28. package/.opencode/skills/intellisearch/references/ddg-search.md +0 -79
  29. package/.opencode/skills/intellisearch/references/deepwiki-tools.md +0 -246
  30. package/.opencode/skills/intellisearch/references/examples.md +0 -97
  31. package/.opencode/skills/intellisearch/references/gh-cli.md +0 -143
  32. package/.opencode/skills/intellisearch/references/google-search.md +0 -40
  33. package/.opencode/skills/intellisearch/references/search-workflow.md +0 -143
  34. package/.opencode/skills/intellisearch/references/workflow.md +0 -115
  35. package/.opencode/skills/openspec-apply-change/SKILL.md +0 -159
  36. package/.opencode/skills/openspec-archive-change/SKILL.md +0 -117
  37. package/.opencode/skills/openspec-explore/SKILL.md +0 -287
  38. package/.opencode/skills/openspec-propose/SKILL.md +0 -111
  39. package/.opencode/skills/openspec-sync-specs/SKILL.md +0 -147
  40. package/.serena/project.yml +0 -133
  41. package/AGENTS.md +0 -136
  42. package/CHANGELOG.md +0 -3
  43. package/bun.lock +0 -105
  44. package/docs/INSTALL.md +0 -185
  45. package/docs/PLAYWRIGHT_CLI_API.md +0 -306
  46. package/docs/python-release-for-reference.md +0 -175
  47. package/examples/sample_json_export.json +0 -32
  48. package/examples/sample_markdown_export.md +0 -221
  49. package/examples/usage_examples.sh +0 -222
  50. package/install.ps1 +0 -264
  51. package/install.sh +0 -275
  52. package/openspec/MAESTRO_MIGRATION.md +0 -180
  53. package/openspec/changes/archive/2026-06-08-command-spec-conformance/.openspec.yaml +0 -2
  54. package/openspec/changes/archive/2026-06-08-command-spec-conformance/design.md +0 -194
  55. package/openspec/changes/archive/2026-06-08-command-spec-conformance/proposal.md +0 -52
  56. package/openspec/changes/archive/2026-06-08-command-spec-conformance/specs/multi-profile-conversations/spec.md +0 -133
  57. package/openspec/changes/archive/2026-06-08-command-spec-conformance/tasks.md +0 -95
  58. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/.openspec.yaml +0 -2
  59. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/design.md +0 -28
  60. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/proposal.md +0 -22
  61. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/specs/interactive-prompt-loop/spec.md +0 -35
  62. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/tasks.md +0 -28
  63. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/.openspec.yaml +0 -2
  64. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/design.md +0 -323
  65. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/proposal.md +0 -122
  66. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/specs/no-capability-changes/spec.md +0 -29
  67. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/tasks.md +0 -172
  68. package/openspec/changes/archive/2026-06-09-v2-install-migration/.openspec.yaml +0 -2
  69. package/openspec/changes/archive/2026-06-09-v2-install-migration/design.md +0 -241
  70. package/openspec/changes/archive/2026-06-09-v2-install-migration/proposal.md +0 -41
  71. package/openspec/changes/archive/2026-06-09-v2-install-migration/specs/v2-installer/spec.md +0 -205
  72. package/openspec/changes/archive/2026-06-09-v2-install-migration/tasks.md +0 -97
  73. package/openspec/changes/commander-cli-parser/.openspec.yaml +0 -2
  74. package/openspec/changes/commander-cli-parser/design.md +0 -107
  75. package/openspec/changes/commander-cli-parser/proposal.md +0 -31
  76. package/openspec/changes/commander-cli-parser/specs/cli/spec.md +0 -48
  77. package/openspec/changes/commander-cli-parser/tasks.md +0 -33
  78. package/openspec/changes/cross-platform-build-and-ci/.openspec.yaml +0 -2
  79. package/openspec/changes/cross-platform-build-and-ci/design.md +0 -213
  80. package/openspec/changes/cross-platform-build-and-ci/proposal.md +0 -50
  81. package/openspec/changes/cross-platform-build-and-ci/specs/path-and-file-mediation/spec.md +0 -335
  82. package/openspec/changes/cross-platform-build-and-ci/specs/release-pipeline/spec.md +0 -95
  83. package/openspec/changes/cross-platform-build-and-ci/tasks.md +0 -164
  84. package/openspec/config.yaml +0 -20
  85. package/openspec/specs/auth/spec.md +0 -394
  86. package/openspec/specs/cli/spec.md +0 -108
  87. package/openspec/specs/commands/spec.md +0 -409
  88. package/openspec/specs/configuration/spec.md +0 -130
  89. package/openspec/specs/conversations/spec.md +0 -139
  90. package/openspec/specs/domain-model/spec.md +0 -128
  91. package/openspec/specs/formatters/spec.md +0 -158
  92. package/openspec/specs/install-browser/spec.md +0 -146
  93. package/openspec/specs/interactive-prompt-loop/spec.md +0 -41
  94. package/openspec/specs/logger/spec.md +0 -71
  95. package/openspec/specs/mediator/spec.md +0 -72
  96. package/openspec/specs/multi-profile-conversations/spec.md +0 -145
  97. package/openspec/specs/path-utils/spec.md +0 -101
  98. package/openspec/specs/profiles/spec.md +0 -94
  99. package/openspec/specs/storage/spec.md +0 -198
  100. package/openspec/specs/testing/spec.md +0 -237
  101. package/openspec/specs/v2-installer/spec.md +0 -205
  102. package/openspec/specs/validators/spec.md +0 -65
  103. package/scripts/build.ts +0 -88
  104. package/scripts/clean-build.ps1 +0 -4
  105. package/scripts/clean-build.sh +0 -5
  106. package/scripts/install-browser.ps1 +0 -5
  107. package/scripts/install-browser.sh +0 -6
  108. package/scripts/lint-path-mediation.ps1 +0 -65
  109. package/scripts/lint-path-mediation.sh +0 -40
  110. package/tests/cli/auth-command.test.ts +0 -220
  111. package/tests/cli/command-registry.test.ts +0 -67
  112. package/tests/cli/continue-command.test.ts +0 -100
  113. package/tests/cli/delete-command.test.ts +0 -128
  114. package/tests/cli/export-all-command.test.ts +0 -375
  115. package/tests/cli/install-browser-command.test.ts +0 -48
  116. package/tests/cli/list-command.test.ts +0 -179
  117. package/tests/cli/new-command.test.ts +0 -139
  118. package/tests/cli/status-command.test.ts +0 -106
  119. package/tests/core/query-handlers.test.ts +0 -187
  120. package/tests/fixtures/auth-fixtures.ts +0 -98
  121. package/tests/fixtures/chat-fixtures.ts +0 -87
  122. package/tests/infrastructure/cli-table.test.ts +0 -107
  123. package/tests/infrastructure/formatters.test.ts +0 -202
  124. package/tests/infrastructure/io.test.ts +0 -197
  125. package/tests/infrastructure/logger.test.ts +0 -74
  126. package/tests/infrastructure/storage.test.ts +0 -335
  127. package/tests/infrastructure/validators.test.ts +0 -67
  128. package/tests/integration/commands/auth.test.ts +0 -186
  129. package/tests/integration/commands/continue.test.ts +0 -130
  130. package/tests/integration/commands/delete.test.ts +0 -140
  131. package/tests/integration/commands/export.test.ts +0 -266
  132. package/tests/integration/commands/fetch.test.ts +0 -238
  133. package/tests/integration/commands/list.test.ts +0 -281
  134. package/tests/integration/commands/profile.test.ts +0 -258
  135. package/tests/integration/commands/status.test.ts +0 -223
  136. package/tests/integration/installer-script-shape.test.ts +0 -67
  137. package/tests/parity/compare-outputs.ts +0 -359
  138. package/tests/parity/test-commands-parity.ps1 +0 -82
  139. package/tests/parity/test-commands-parity.sh +0 -61
  140. package/tests/services/auth-service.test.ts +0 -315
  141. package/tests/services/cookie-monitor.test.ts +0 -229
  142. package/tests/services/cookie-storage-service.test.ts +0 -230
  143. package/tests/services/gemini-client-wrapper.test.ts +0 -688
  144. package/tests/services/install-browser-service.test.ts +0 -83
  145. package/tests/services/playwright-cli-driver.test.ts +0 -468
  146. package/tests/services/profile-auth-manager.test.ts +0 -334
  147. package/tests/services/profile-service.test.ts +0 -224
  148. package/tests/setup.ts +0 -95
  149. package/tests/smoke/smoke.test.ts +0 -52
  150. package/tests/unit/config.test.ts +0 -159
  151. package/tests/unit/errors.test.ts +0 -119
  152. package/tests/unit/formatters.test.ts +0 -316
  153. package/tests/unit/mediator.test.ts +0 -152
  154. package/tests/unit/path-utils.test.ts +0 -289
  155. package/tsconfig.json +0 -16
package/install.sh DELETED
@@ -1,275 +0,0 @@
1
- #!/usr/bin/env bash
2
- # GemiTerm v2.0.0 installer for Linux/WSL
3
- #
4
- # Usage:
5
- # curl -fsSL https://github.com/expert-vision-software/GemiTerm/releases/latest/download/install.sh | bash
6
- # GEMITERM_TAG=v2.0.0-rc.1 bash install.sh
7
- # GEMITERM_INSTALL_DIR=~/.local/bin bash install.sh
8
- # bash install.sh --uninstall
9
- # bash install.sh --whatif
10
- #
11
- # v1.4.1 → v2.0.0 upgrades replace the binary in place; the config dir at
12
- # ~/gemiterm/ (POSIX) is NEVER deleted by this installer.
13
-
14
- set -euo pipefail
15
-
16
- REPO="expert-vision-software/GemiTerm"
17
- INSTALL_DIR="${GEMITERM_INSTALL_DIR:-$HOME/.local/bin}"
18
- BIN_PATH="$INSTALL_DIR/gemiterm"
19
- CONFIG_DIR="$HOME/gemiterm"
20
- ENV_SNIPPET="$CONFIG_DIR/env.sh"
21
- TAG="${GEMITERM_TAG:-latest}"
22
- WHAT_IF=false
23
-
24
- remove_source_line() {
25
- local rc_file="$1"
26
- if [[ -f "$rc_file" ]]; then
27
- local tmp
28
- tmp=$(mktemp)
29
- grep -v 'gemiterm/env.sh' "$rc_file" > "$tmp" || true
30
- mv "$tmp" "$rc_file"
31
- fi
32
- }
33
-
34
- # Parse flags
35
- if [[ "${1:-}" = "--whatif" || "${1:-}" = "--dry-run" ]]; then
36
- WHAT_IF=true
37
- shift
38
- fi
39
-
40
- # --- Detect Python v1.4.1 (task 8.2) ---
41
- if command -v pip >/dev/null 2>&1 && pip show gemiterm >/dev/null 2>&1; then
42
- echo "WARNING: Python v1.4.1 detected. Your config data at ~/gemiterm/ is safe and will be preserved. Please run 'pip uninstall gemiterm' before re-running this installer to complete the v2.0.0 installation."
43
- exit 1
44
- fi
45
-
46
- # --- Uninstall (task 3.3) ---
47
- if [[ "${1:-}" = "--uninstall" ]]; then
48
- echo "Removing GemiTerm..."
49
-
50
- if [[ -f "$BIN_PATH" ]]; then
51
- if $WHAT_IF; then echo "[WhatIf] Would delete $BIN_PATH"; else rm -f "$BIN_PATH"; echo " Removed $BIN_PATH"; fi
52
- else
53
- echo " $BIN_PATH not found (already removed)"
54
- fi
55
-
56
- if [[ -f "$ENV_SNIPPET" ]]; then
57
- if $WHAT_IF; then echo "[WhatIf] Would delete $ENV_SNIPPET"; else rm -f "$ENV_SNIPPET"; echo " Removed $ENV_SNIPPET"; fi
58
- fi
59
-
60
- if $WHAT_IF; then
61
- echo "[WhatIf] Would remove gemiterm/env.sh source line from $HOME/.bashrc"
62
- else
63
- remove_source_line "$HOME/.bashrc"
64
- fi
65
-
66
- if [[ -f "$HOME/.zshrc" ]]; then
67
- if $WHAT_IF; then
68
- echo "[WhatIf] Would remove gemiterm/env.sh source line from $HOME/.zshrc"
69
- else
70
- remove_source_line "$HOME/.zshrc"
71
- fi
72
- fi
73
-
74
- echo "GemiTerm uninstall review complete. No changes were made."
75
- exit 0
76
- fi
77
-
78
- # --- Upgrade detection (task 3.4) ---
79
- if [[ -x "$BIN_PATH" ]]; then
80
- echo "Detected existing install at $BIN_PATH; upgrading in place."
81
- fi
82
-
83
- # --- v1.4.1 → v2.0.0 config migration (task 11.1) ---
84
- # v1.4.1 wrote config to $HOME/.config/gemiterm/ on POSIX. v2.0.0 reads from
85
- # $HOME/gemiterm/. If the old path exists and the new one does not, copy the
86
- # tree forward. The v1.4.1 directory is left in place as a safety net.
87
- V14_CONFIG_DIR="$HOME/.config/gemiterm"
88
- if [[ -d "$V14_CONFIG_DIR" && ! -d "$CONFIG_DIR" ]]; then
89
- echo "Detected v1.4.1 config at $V14_CONFIG_DIR; migrating to $CONFIG_DIR"
90
- if $WHAT_IF; then
91
- echo "[WhatIf] Would create directory $CONFIG_DIR"
92
- echo "[WhatIf] Would copy $V14_CONFIG_DIR/ to $CONFIG_DIR/"
93
- else
94
- mkdir -p "$CONFIG_DIR"
95
- cp -R "$V14_CONFIG_DIR/." "$CONFIG_DIR/"
96
- echo "v1.4.1 config copied to $CONFIG_DIR. The original at $V14_CONFIG_DIR is left in place as a backup."
97
- fi
98
- fi
99
-
100
- # Determine package-manager executable (prefer bunx over npx)
101
- if command -v bun >/dev/null 2>&1; then
102
- PACKAGE_MANAGER_X="bunx"
103
- elif command -v npm >/dev/null 2>&1; then
104
- PACKAGE_MANAGER_X="npx"
105
- else
106
- PACKAGE_MANAGER_X="bunx" # will be bootstrapped below
107
- fi
108
-
109
- # --- Package-manager prompt (task 11.2) ---
110
- # If bun or npm is on PATH, recommend installing via the package manager
111
- # (npm: `npm i -g gemiterm`; bun: `bun i -g gemiterm`) instead of this
112
- # binary drop. The prompt is skipped when stdin is not a TTY (e.g. the
113
- # `curl | bash` one-liner flow runs unattended and must not block).
114
- if { command -v bun >/dev/null 2>&1 || command -v npm >/dev/null 2>&1; } && [[ -t 0 ]]; then
115
- echo ""
116
- echo "It is recommended to install via bun or npm package manager."
117
- echo "Are you sure you want to continue with binary install? [y/N]"
118
- read -r REPLY
119
- case "$REPLY" in
120
- [yY]|[yY][eE][sS]) ;;
121
- *)
122
- echo "Aborted. Install via: $(command -v bun >/dev/null 2>&1 && echo 'bun i -g gemiterm' || echo 'npm i -g gemiterm')"
123
- exit 0
124
- ;;
125
- esac
126
- fi
127
-
128
- # --- Resolve release (task 3.5) ---
129
- API_URL="https://api.github.com/repos/$REPO/releases/latest"
130
- if [[ "$TAG" != "latest" ]]; then
131
- API_URL="https://api.github.com/repos/$REPO/releases/tags/$TAG"
132
- fi
133
-
134
- # --- Network check (task 3.11) ---
135
- if ! curl -fsSI -o /dev/null "$API_URL" 2>/dev/null; then
136
- echo "Cannot reach GitHub releases. Check your network connection or use the 'build from source' instructions in docs/INSTALL.md."
137
- exit 1
138
- fi
139
-
140
- RELEASE_JSON=$(curl -fsSL "$API_URL")
141
-
142
- ASSET_URL=$(echo "$RELEASE_JSON" | grep -oE '"browser_download_url":"[^"]*"' \
143
- | sed 's/"browser_download_url":"//;s/"$//' \
144
- | grep -E '/gemiterm$' \
145
- | head -n 1)
146
-
147
- if [[ -z "$ASSET_URL" ]]; then
148
- echo "No gemiterm binary asset found in release."
149
- echo "Build from source:"
150
- echo " git clone https://github.com/$REPO.git && cd GemiTerm && bun install && bun run build"
151
- exit 1
152
- fi
153
-
154
- VERSION=$(echo "$RELEASE_JSON" | grep -oE '"tag_name":"[^"]*"' | head -n 1 | sed 's/"tag_name":"//;s/"$//')
155
-
156
- # --- Download (task 3.6) ---
157
- if $WHAT_IF; then
158
- echo "[WhatIf] Would create directory $INSTALL_DIR"
159
- else
160
- mkdir -p "$INSTALL_DIR"
161
- fi
162
-
163
- if $WHAT_IF; then
164
- echo "[WhatIf] Would download $ASSET_URL to $BIN_PATH"
165
- echo "[WhatIf] Would set executable bit on $BIN_PATH"
166
- else
167
- if ! curl -fSL -o "$BIN_PATH.new" "$ASSET_URL"; then
168
- rm -f "$BIN_PATH.new"
169
- echo "Download failed."
170
- exit 1
171
- fi
172
- mv "$BIN_PATH.new" "$BIN_PATH"
173
- chmod +x "$BIN_PATH"
174
- fi
175
-
176
- # --- Bootstrap package manager if needed (task 9.2 + 9.3) ---
177
- if [[ "$PACKAGE_MANAGER_X" = "bunx" ]] && ! command -v bun >/dev/null 2>&1; then
178
- if $WHAT_IF; then
179
- echo "[WhatIf] Would install Bun from https://bun.sh/install"
180
- else
181
- echo "Installing Bun..."
182
- if ! curl -fsSL https://bun.sh/install | bash; then
183
- if command -v npm >/dev/null 2>&1; then
184
- echo "Bun installation failed, falling back to npx."
185
- PACKAGE_MANAGER_X="npx"
186
- else
187
- echo "Bun installation failed and npm is not available. Install Bun from https://bun.sh or npm from https://nodejs.org and re-run this installer."
188
- exit 1
189
- fi
190
- fi
191
- if [[ "$PACKAGE_MANAGER_X" = "bunx" ]]; then
192
- export PATH="$HOME/.bun/bin:$PATH"
193
- if ! command -v bun >/dev/null 2>&1; then
194
- if command -v npm >/dev/null 2>&1; then
195
- echo "Bun installation failed, falling back to npx."
196
- PACKAGE_MANAGER_X="npx"
197
- else
198
- echo "Bun installation failed. Install Bun manually from https://bun.sh and re-run this installer."
199
- exit 1
200
- fi
201
- fi
202
- fi
203
- fi
204
- fi
205
-
206
- # --- Install Chromium (task 3.7) ---
207
- if $WHAT_IF; then
208
- echo "[WhatIf] Would run: $PACKAGE_MANAGER_X @playwright/cli install chromium"
209
- else
210
- echo "Installing Chromium browser for Playwright..."
211
- if ! $PACKAGE_MANAGER_X @playwright/cli install chromium; then
212
- echo "Chromium installation failed. Re-run the installer after fixing the issue, or run '${PACKAGE_MANAGER_X} @playwright/cli install chromium' manually."
213
- exit 1
214
- fi
215
- fi
216
-
217
- # --- Verify Chromium (task 3.8) ---
218
- if $WHAT_IF; then
219
- echo "[WhatIf] Would verify Chromium installation in $HOME/.cache/ms-playwright"
220
- else
221
- CHROME_PATH=$(find "$HOME/.cache/ms-playwright" -path '*/chromium-*/chrome-linux/chrome' -type f -executable 2>/dev/null | head -n 1)
222
- if [[ -z "$CHROME_PATH" ]]; then
223
- CHROME_PATH=$(find "$HOME/.cache/ms-playwright" -path '*/chromium-*' -name chrome -type f -executable 2>/dev/null | head -n 1)
224
- fi
225
-
226
- if [[ -n "$CHROME_PATH" ]]; then
227
- echo "Chromium verified at $CHROME_PATH"
228
- else
229
- echo "Chromium installation verification failed. Re-run the installer after fixing the network, or run '${PACKAGE_MANAGER_X} @playwright/cli install chromium' manually."
230
- exit 1
231
- fi
232
- fi
233
-
234
- # --- PATH augmentation (task 3.9) ---
235
- if $WHAT_IF; then
236
- echo "[WhatIf] Would create directory $CONFIG_DIR"
237
- echo "[WhatIf] Would write $ENV_SNIPPET"
238
- else
239
- mkdir -p "$CONFIG_DIR"
240
- cat > "$ENV_SNIPPET" <<'ENVEOF'
241
- export PATH="$HOME/.local/bin:$PATH"
242
- ENVEOF
243
- fi
244
-
245
- SOURCE_LINE='[[ -f "$HOME/gemiterm/env.sh" ]] && source "$HOME/gemiterm/env.sh"'
246
-
247
- if [[ -f "$HOME/.bashrc" ]] && ! grep -qiF 'gemiterm/env.sh' "$HOME/.bashrc"; then
248
- if $WHAT_IF; then
249
- echo "[WhatIf] Would append gemiterm/env.sh source line to $HOME/.bashrc"
250
- else
251
- echo "$SOURCE_LINE" >> "$HOME/.bashrc"
252
- fi
253
- fi
254
-
255
- if [[ -f "$HOME/.zshrc" ]] && ! grep -qiF 'gemiterm/env.sh' "$HOME/.zshrc"; then
256
- if $WHAT_IF; then
257
- echo "[WhatIf] Would append gemiterm/env.sh source line to $HOME/.zshrc"
258
- else
259
- echo "$SOURCE_LINE" >> "$HOME/.zshrc"
260
- fi
261
- fi
262
-
263
- if ! $WHAT_IF; then
264
- export PATH="$INSTALL_DIR:$PATH"
265
- fi
266
-
267
- # --- Success (task 3.10) ---
268
- if $WHAT_IF; then
269
- echo ""
270
- echo "WhatIf review complete. No changes were made."
271
- echo "GemiTerm ${VERSION:-unknown} would be installed to $BIN_PATH using ${PACKAGE_MANAGER_X}.Chromium."
272
- echo "Run without --whatif to apply."
273
- else
274
- echo "GemiTerm ${VERSION:-unknown} installed to $BIN_PATH. Run 'gemiterm status' to verify, then 'gemiterm auth' to authenticate. Restart your shell (or 'source ~/gemiterm/env.sh') to pick up the new PATH."
275
- fi
@@ -1,180 +0,0 @@
1
- # Maestro → OpenSpec Migration Status
2
-
3
- This document maps every Maestro plan task to its current completion status
4
- and the corresponding OpenSpec artifact (main spec or active change). It
5
- serves as the canonical "task list with checkmarks" for the migration.
6
-
7
- **Source of truth:**
8
- - Maestro plans: `C:\dev\projects\github\webgemini-cli\.maestro\playbooks\2026-06-06-GemiTerm-Bun-Port\Phase-{01..06}-*.md`
9
- - OpenSpec main specs (completed work): `openspec/specs/`
10
- - OpenSpec changes (remaining work): `openspec/changes/`
11
- - Test baseline: `bun test` → **432 pass, 0 fail, 754 expect() calls** (10.5 s)
12
-
13
- **Status legend:**
14
- - ✅ **DONE** — capability exists in code, covered by passing tests, no obvious gaps vs the Maestro description
15
- - 🟡 **PARTIAL** — capability is mostly there but with documented deviations (e.g. a Maestro-spec'd behavior was not implemented; an intentional improvement replaced a Maestro item)
16
- - ❌ **NOT DONE** — Maestro task has no implementation; an OpenSpec change captures the remaining work
17
- - ⚠️ **N/A** — Maestro task is not applicable to the Bun rewrite (e.g. Python-only tooling)
18
- - ⏭️ **DEFERRED** — out of scope for the v2.0.0 release; tracked in a follow-up
19
-
20
- ---
21
-
22
- ## Phase 01: Project Setup & Working Prototype
23
-
24
- | # | Maestro task | Status | OpenSpec artifact | Evidence / notes |
25
- |---|---|---|---|---|
26
- | 1.1 | Initialize Bun project (`bun init`, name `gemiterm`, `type: module`, `private`) | ✅ DONE | `openspec/specs/cli/spec.md` | `package.json:2-6`; `e363609` (git) |
27
- | 1.2 | Create `src/` directory structure | ✅ DONE | `openspec/specs/cli/spec.md` | All 5 dirs present; `3877b6c` |
28
- | 1.3 | Create `tsconfig.json` | ✅ DONE | (covered by cli spec) | `tsconfig.json` matches Maestro shape exactly; 0 type errors |
29
- | 1.4 | Cross-platform path utility `src/infrastructure/path-utils.ts` | ✅ DONE (partial) | `openspec/specs/path-utils/spec.md`; missing helpers in `cross-platform-build-and-ci` | Core 4 functions present + extras. `isWindows`/`isWSL`/`isLinux`/`normalizePath`/`getPlatformName` are missing — `cross-platform-build-and-ci` adds them as re-exports. |
30
- | 1.5 | `src/infrastructure/config.ts` | ✅ DONE | `openspec/specs/configuration/spec.md` | All 7 functions present; 13 unit tests |
31
- | 1.6 | `src/core/types.ts` | ✅ DONE | `openspec/specs/domain-model/spec.md` | All 6 interfaces present |
32
- | 1.7 | `src/core/errors.ts` | ✅ DONE | `openspec/specs/domain-model/spec.md` | All 6 error classes; 13 unit tests |
33
- | 1.8 | `src/cli/index.ts` main entry | ✅ DONE | `openspec/specs/cli/spec.md` | shebang, global flags, dispatch all working; 3 smoke tests |
34
- | 1.9 | `src/cli/commands/help.ts` | ✅ DONE | `openspec/specs/cli/spec.md` | `showHelp(registry)`; covered by every `--help` integration test |
35
- | 1.10 | `package.json` scripts | ✅ DONE | (covered by `cli` spec + `cross-platform-build-and-ci`) | `start`, `dev`, `typecheck`, `test`, `test:unit`, `test:integration`, `test:parity`, `test:smoke`, `test:all`, `build`, `build:linux`, `build:windows` present. **`build*` are broken in Bun 1.3.x** — fixed by `cross-platform-build-and-ci`. `lint`/`format` (ruff) are N/A. |
36
- | 1.11 | `bun add commander chalk` and `bun add -d @types/bun` | ✅ DONE (with cleanup) | `cross-platform-build-and-ci` removes unused `commander` | `chalk` is used; `commander` is installed but **never imported** — cleanup task in change 1 |
37
- | 1.12 | Verify `bun run src/cli/index.ts --help` | ✅ DONE | `openspec/specs/testing/spec.md` | `tests/smoke/smoke.test.ts:31-37` |
38
- | 1.13 | Verify ruff linting | ⚠️ N/A | — | Maestro itself notes ruff is a Python tool not applicable to TS |
39
- | 1.14 | Verify `tsc --noEmit` | ✅ DONE | (covered by `cli` spec) | `bun run typecheck` → 0 errors |
40
-
41
- ---
42
-
43
- ## Phase 02: Core Architecture (Mediator Pattern + SOLID)
44
-
45
- | # | Maestro task | Status | OpenSpec artifact | Evidence / notes |
46
- |---|---|---|---|---|
47
- | 2.1 | `src/core/mediator.ts` | ✅ DONE | `openspec/specs/mediator/spec.md` | 9 unit tests; `4dd344d` |
48
- | 2.2 | `src/core/command-handlers.ts` | ✅ DONE | (internal — referenced by `commands` and `auth` specs) | All 7 command types + handlers; covered by `tests/core/query-handlers.test.ts` + integration tests |
49
- | 2.3 | `src/core/query-handlers.ts` | ✅ DONE | (internal — referenced by `commands` and `auth` specs) | All 5 query types + handlers; 9 unit tests |
50
- | 2.4 | `src/infrastructure/storage.ts` | ✅ DONE | `openspec/specs/storage/spec.md` | `CookieStorage` + `ProfileManager`; 21 unit tests |
51
- | 2.5 | `src/infrastructure/logger.ts` | ✅ DONE | `openspec/specs/logger/spec.md` | stderr-only timestamped logger; 7 unit tests |
52
- | 2.6 | `src/infrastructure/validators.ts` | ✅ DONE | `openspec/specs/validators/spec.md` | All 3 validators; 10 unit tests (file lives in `tests/infrastructure/`, not `tests/unit/` — same coverage) |
53
- | 2.7 | `src/infrastructure/formatters.ts` | ✅ DONE | `openspec/specs/formatters/spec.md` | All 4 formatters; 22 unit tests across 2 files |
54
- | 2.8 | `src/services/gemini-client-wrapper.ts` | ✅ DONE | `openspec/specs/conversations/spec.md` | 6 methods + `isAuthenticated()`; HTTP routes to `gemini.google.com/app/api/...` |
55
- | 2.9 | `src/services/profile-service.ts` | ✅ DONE | `openspec/specs/profiles/spec.md` | All 5 methods; 8 unit tests |
56
- | 2.10 | `src/cli/command-registry.ts` | ✅ DONE (deviation) | `openspec/specs/commands/spec.md` | Explicit `registerAllCommands()` (not auto-discovery); 6 unit tests; `84c24cf` formalized this |
57
- | 2.11 | `src/cli/index.ts` uses mediator + registry | ✅ DONE | `openspec/specs/cli/spec.md` | dispatch + unknown-command handling; `e784eef` |
58
- | 2.12 | Verify architecture compiles | ✅ DONE | (covered by `cli` + `testing` specs) | `tests/smoke/smoke.test.ts:31-37`; `c236027`, `0ec3682` |
59
- | 2.13 | `ruff check src/` + `tsc --noEmit` | ⚠️ N/A + ✅ | — | ruff N/A; `tsc --noEmit` clean |
60
-
61
- ---
62
-
63
- ## Phase 03: Auth Flow Implementation
64
-
65
- > **⚠️ DELICATE — recent commits `4bc4de8` and `0ec3682` show active iteration. Do not modify playwright-cli-driver / cookie-monitor / auth-service lightly.**
66
-
67
- | # | Maestro task | Status | OpenSpec artifact | Evidence / notes |
68
- |---|---|---|---|---|
69
- | 3.1 | `src/services/playwright-cli-driver.ts` | ✅ DONE | `openspec/specs/auth/spec.md` | All 8 methods + `withSession`; auto-detect between `playwright-cli` and `bunx @playwright/cli`; 15 unit tests |
70
- | 3.2 | `src/services/cookie-monitor.ts` | ✅ DONE (improvement) | `openspec/specs/auth/spec.md` | All 4 methods; `POLL_INTERVAL_MS=2_000`; `DEFAULT_TIMEOUT_MS=300_000`; timeout `.unref()`-ed. **Login detection uses sign-out link probe** (intentional improvement, `e4d1fef`), not Maestro's textarea+URL check. |
71
- | 3.3 | `src/services/auth-service.ts` | 🟡 PARTIAL | `openspec/specs/auth/spec.md` | All 8 methods present; 13 unit tests. **"Press Enter to launch browser..." is a one-shot UI message, not a blocking prompt** — Maestro specified blocking on Enter. Intentional change; documented as current behavior. |
72
- | 3.4 | `src/services/cookie-storage-service.ts` | ✅ DONE (deviation) | `openspec/specs/auth/spec.md` | All 4 methods; 7-day freshness window; 9 unit tests. **Composes `CookieStorage` via DI** (not extends), functionally equivalent |
73
- | 3.5 | `src/services/profile-auth-manager.ts` | ✅ DONE (with bug) | `openspec/specs/auth/spec.md`; bug fixed in `command-spec-conformance` | `ensureAuthenticated`, `getActiveProfiles`, `findProfileForConversation` all present. **`findProfileForConversation` ignores its `conversationId` argument** — returns first active profile. Bug is fixed in `command-spec-conformance` change. 8 unit tests document the BUG (to be updated). |
74
- | 3.6 | `src/cli/commands/auth-command.ts` | ✅ DONE | `openspec/specs/commands/spec.md` | Profile selection menu with all 5 options; 12 CLI tests + 7 integration tests. Registered as `auth` (Maestro's note said `login` — Maestro was slightly off) |
75
- | 3.7 | `src/cli/commands/status-command.ts` | ✅ DONE | `openspec/specs/commands/spec.md` | Config dir + 4-column profile table; exits 2 if no profiles; 3 CLI tests + 9 integration tests |
76
- | 3.8 | `src/cli/commands/profile-command.ts` | ✅ DONE | `openspec/specs/commands/spec.md` | All 5 actions + help; 17 integration tests |
77
- | 3.9 | `src/services/install-browser-service.ts` | ✅ DONE | `openspec/specs/install-browser/spec.md` (current surface); cross-platform refactor in `cross-platform-build-and-ci` | All methods + Windows/Linux/WSL browser detection; 5 unit tests. The refactor in `cross-platform-build-and-ci` extracts the WSL detection to the shared `platform-detect` module — **behavior-preserving**, the 5 tests are the regression gate |
78
- | 3.10 | `src/cli/commands/install-browser-command.ts` | ✅ DONE | `openspec/specs/install-browser/spec.md` | Wraps `InstallBrowserService.install()`; 3 CLI tests |
79
- | 3.11 | Verify auth flow end-to-end | ✅ DONE | `openspec/specs/commands/spec.md` + `auth` spec | 12 CLI tests + 7 integration tests + 13 service tests |
80
- | 3.12 | `ruff check src/` + `tsc --noEmit` | ⚠️ N/A + ✅ | — | ruff N/A; `tsc --noEmit` clean |
81
-
82
- ---
83
-
84
- ## Phase 04: Command Implementation
85
-
86
- | # | Maestro task | Status | OpenSpec artifact | Evidence / notes |
87
- |---|---|---|---|---|
88
- | 4.1 | `src/cli/commands/list-command.ts` | 🟡 PARTIAL | `openspec/specs/commands/spec.md`; fix in `command-spec-conformance` | All 10 flags parsed; 11 CLI tests + 21 integration tests. **Profile column missing when `--all-profiles`** — fixed in `command-spec-conformance` |
89
- | 4.2 | `src/cli/commands/fetch-command.ts` | ✅ DONE | `openspec/specs/commands/spec.md` | 18 integration tests |
90
- | 4.3 | `src/cli/commands/continue-command.ts` | 🟡 PARTIAL | `openspec/specs/commands/spec.md`; fix in `command-spec-conformance` | Non-interactive + interactive REPL with `/exit`. **Does NOT call `findProfileForConversation`** — fixed in `command-spec-conformance`. 5 CLI tests |
91
- | 4.4 | `src/cli/commands/new-command.ts` | ✅ DONE | `openspec/specs/commands/spec.md` | Non-interactive + interactive REPL with `--profile` |
92
- | 4.5 | `src/cli/commands/delete-command.ts` | 🟡 PARTIAL | `openspec/specs/commands/spec.md`; fix in `command-spec-conformance` | Confirmation prompt + `--force`. **Does NOT call `findProfileForConversation`** — fixed in `command-spec-conformance`. 7 CLI tests |
93
- | 4.6 | `src/cli/commands/export-command.ts` | ✅ DONE | `openspec/specs/commands/spec.md` | Default filename + JSON/markdown + output dir; 12 integration tests |
94
- | 4.7 | `src/cli/commands/export-all-command.ts` | ✅ DONE | `openspec/specs/commands/spec.md` | All flags; index.md with links; progress + failure tracking; 9 CLI tests |
95
- | 4.8 | Update `command-registry.ts` to register all 11 commands | ✅ DONE | `openspec/specs/commands/spec.md` | All 11 commands registered in `registerAllCommands()`; `84c24cf` |
96
- | 4.9 | Update `src/cli/index.ts` for global flags + unknown commands | ✅ DONE | `openspec/specs/cli/spec.md` | `--verbose`/`-v`, `--help`/`-h`, `--version`, unknown command → "Did you mean one of: …?"; `a3e1d8d` |
97
- | 4.10 | Verify all commands with `--help` | ✅ DONE | `openspec/specs/commands/spec.md` + `testing` spec | 600+ integration assertions exercise `--help` on every command |
98
- | 4.11 | `ruff check src/` + `tsc --noEmit` | ⚠️ N/A + ✅ | — | ruff N/A; `tsc --noEmit` clean |
99
-
100
- ---
101
-
102
- ## Phase 05: CI/CD & Build
103
-
104
- | # | Maestro task | Status | OpenSpec artifact | Evidence / notes |
105
- |---|---|---|---|---|
106
- | 5.1 | `.github/workflows/test.yml` | ❌ NOT DONE | `cross-platform-build-and-ci` change (`release-pipeline` spec) | The directory exists but is empty |
107
- | 5.2 | `.github/workflows/build.yml` | ❌ NOT DONE | `cross-platform-build-and-ci` change (`release-pipeline` spec) | Not present |
108
- | 5.3 | `.github/workflows/release.yml` | ❌ NOT DONE | `cross-platform-build-and-ci` change (`release-pipeline` spec) | Not present |
109
- | 5.4 | `package.json` build scripts | 🟡 PARTIAL (broken) | `cross-platform-build-and-ci` change (`release-pipeline` spec) | Scripts present but `bun run build` fails: `error: cannot use --compile with --outdir` (Bun 1.3.x). Fix uses `--outfile` instead |
110
- | 5.5 | `scripts/clean-build.sh` + `scripts/clean-build.ps1` | ❌ NOT DONE | `cross-platform-build-and-ci` change (`release-pipeline` spec) | `scripts/` directory does not exist |
111
- | 5.6 | `src/infrastructure/path-utils.ts` updates (isWindows, isWSL, normalizePath, getPlatformName) | ❌ NOT DONE | `cross-platform-build-and-ci` change (`platform-detection` spec) | 0 matches for any of these in `src/`. WSL detection duplicated inline in `install-browser-service.ts:143-171` |
112
- | 5.7 | `src/infrastructure/platform-detect.ts` | ❌ NOT DONE | `cross-platform-build-and-ci` change (`platform-detection` spec) | File does not exist |
113
- | 5.8 | `src/services/install-browser-service.ts` cross-platform | ✅ DONE | (current state covered by `install-browser` spec) | All platform-specific finders present; 5 unit tests |
114
- | 5.9 | `scripts/install-browser.ps1` | ❌ NOT DONE | `cross-platform-build-and-ci` change (`release-pipeline` spec) | Not present |
115
- | 5.10 | `scripts/install-browser.sh` | ❌ NOT DONE | `cross-platform-build-and-ci` change (`release-pipeline` spec) | Not present |
116
- | 5.11 | `src/cli/index.ts` shebang | ✅ DONE | `openspec/specs/cli/spec.md` | `#!/usr/bin/env bun` (line 1) |
117
- | 5.12 | Verify build works locally | ❌ NOT DONE | `cross-platform-build-and-ci` change (`release-pipeline` spec) | Build is broken (5.4) |
118
- | 5.13 | `ruff check src/` + `tsc --noEmit` | ⚠️ N/A + ✅ | — | ruff N/A; `tsc --noEmit` clean |
119
-
120
- ---
121
-
122
- ## Phase 06: Testing
123
-
124
- | # | Maestro task | Status | OpenSpec artifact | Evidence / notes |
125
- |---|---|---|---|---|
126
- | 6.1 | `tests/setup.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 7 global helpers; `ad0df81` |
127
- | 6.2 | `tests/fixtures/auth-fixtures.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 4 factories + 3 constants |
128
- | 6.3 | `tests/fixtures/chat-fixtures.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 3 factories |
129
- | 6.4 | `tests/unit/path-utils.test.ts` | 🟡 PARTIAL | `openspec/specs/testing/spec.md`; gap closed by `cross-platform-build-and-ci` | 19 tests; **missing tests for `isWindows`/`isLinux`/`isWSL`** (functions don't exist yet — gap closed when `platform-detection` change lands) |
130
- | 6.5 | `tests/unit/config.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 13 tests; `3446e3a` |
131
- | 6.6 | `tests/unit/validators.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 10 tests (file is in `tests/infrastructure/`, not `tests/unit/`) |
132
- | 6.7 | `tests/unit/formatters.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 14 unit + 8 infrastructure tests covering all 4 formatters; `698ff3d` |
133
- | 6.8 | `tests/unit/mediator.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 9 tests; `3ac6a41` |
134
- | 6.9 | `tests/unit/errors.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 13 tests; `3ac6a41` |
135
- | 6.10 | `tests/integration/commands/auth.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 7 tests; `1505d3e` |
136
- | 6.11 | `tests/integration/commands/list.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 21 tests; `87fe60b` + `9bdbe2f` |
137
- | 6.12 | `tests/integration/commands/fetch.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 18 tests; `96a586d` |
138
- | 6.13 | `tests/integration/commands/export.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 12 tests; `6619148` |
139
- | 6.14 | `tests/integration/commands/profile.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 17 tests; `81ccbe3` |
140
- | 6.15 | `tests/integration/commands/status.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 9 tests; `e4cc17a` |
141
- | 6.16 | `tests/parity/compare-outputs.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | Full framework with normalization; `451e54d` + `4cae594` |
142
- | 6.17 | `tests/parity/test-commands-parity.{sh,ps1}` | ✅ DONE | `openspec/specs/testing/spec.md` | Both shells present |
143
- | 6.18 | `tests/smoke/smoke.test.ts` | ✅ DONE | `openspec/specs/testing/spec.md` | 3 tests; `d3a4bb4` |
144
- | 6.19 | `package.json` test scripts | ✅ DONE | `openspec/specs/testing/spec.md` | All 6 scripts; `8bb251a` |
145
- | 6.20 | `bun test` → 0 failures | ✅ DONE | (verified at migration start; 432/432) | Re-verified at end of migration |
146
- | 6.21 | Run parity tests | 🟡 PARTIAL | `openspec/specs/testing/spec.md` | Parity infra exists and passes; **results against Python CLI not yet committed** (requires v1.4.1 Python CLI on PATH) |
147
- | 6.22 | `ruff check src/` + `tsc --noEmit` | ⚠️ N/A + ✅ | — | ruff N/A; `tsc --noEmit` clean |
148
-
149
- ---
150
-
151
- ## Cross-Phase Gaps (not in any Maestro task)
152
-
153
- | # | Item | Status | OpenSpec artifact | Evidence / notes |
154
- |---|---|---|---|---|
155
- | C.1 | `install.ps1` / `install.sh` for v2.0.0 (replaces deleted v1.4.1 installer) | ❌ NOT DONE | `v2-install-migration` change (`v2-installer` spec) | The v1.4.1 `install.ps1` was deleted in commit `4bdefa8` "remove all python implementation". For v1.4.1 → v2.0.0 seamless upgrade, a new install.ps1 + install.sh are required |
156
- | C.2 | `docs/INSTALL.md` end-user install guide | ❌ NOT DONE | `v2-install-migration` change (`v2-installer` spec) | Not present |
157
- | C.3 | `README.md` "Upgrading from v1.4.1" callout | ❌ NOT DONE | `v2-install-migration` change (`v2-installer` spec) | README still references old install flow |
158
- | C.4 | `.gitignore` stray `{` line + orphan `{` file | ❌ NOT DONE | `cross-platform-build-and-ci` change (`platform-detection` / cleanup tasks) | `.gitignore:23` is bare `{`; a 0-byte file named `{` is at repo root |
159
- | C.5 | Unused `commander` dependency | ❌ NOT DONE | `cross-platform-build-and-ci` change (cleanup tasks) | `commander@^15.0.0` in `package.json:20` and `bun.lock:33`; 0 imports in `src/` |
160
- | C.6 | `src/commands/` empty placeholder | ❌ NOT DONE | `cross-platform-build-and-ci` change (cleanup tasks) | Contains only `.gitkeep`; real commands live in `src/cli/commands/` |
161
- | C.7 | `bun run build` is broken in Bun 1.3.x | ❌ NOT DONE | `cross-platform-build-and-ci` change (`release-pipeline` spec) | `error: cannot use --compile with --outdir` |
162
-
163
- ---
164
-
165
- ## Summary
166
-
167
- - **DONE:** 53 tasks ✅ + 5 N/A ⚠️
168
- - **PARTIAL:** 6 tasks 🟡 (all have follow-up changes; see column 4)
169
- - **NOT DONE:** 16 tasks ❌ (all have follow-up changes; see column 4)
170
-
171
- | OpenSpec change | Maestro/cross-phase items | Implementation tasks | Status |
172
- |---|---|---|---|
173
- | `cross-platform-build-and-ci` | 5.1–5.3, 5.4 (build fix), 5.5, 5.6, 5.7, 5.9, 5.10, 5.12, C.4, C.5, C.6, C.7 | 36 tasks across 12 groups | ready to apply |
174
- | `v2-install-migration` | C.1, C.2, C.3 | 36 tasks across 8 groups | ready to apply |
175
- | `command-spec-conformance` | 3.5 (bug fix), 4.1 (Profile column), 4.3 (continue profile lookup), 4.5 (delete profile lookup) | ~40 tasks across 12 groups | ready to apply |
176
- | 15 main specs (auth, cli, commands, …) | 53 ✅ tasks documented as the canonical current state | — | all validate |
177
-
178
- **Test baseline:** 432 pass, 0 fail, 754 expect() calls, 10.5 s. No source code was modified during the migration; the OpenSpec artifacts are pure documentation that describe the work to be done in follow-up changes.
179
-
180
- **To start the implementation of a change:** `cd <repo> && /opsx-apply <change-name>` (or ask your AI assistant to apply the change).
@@ -1,2 +0,0 @@
1
- schema: spec-driven
2
- created: 2026-06-08