Skip to content

fix(memory): QMD path resolution + setup wizard improvements + skill scan#5

Merged
e-mon merged 8 commits into
mainfrom
fix/qmd-import-resolve
Mar 13, 2026
Merged

fix(memory): QMD path resolution + setup wizard improvements + skill scan#5
e-mon merged 8 commits into
mainfrom
fix/qmd-import-resolve

Conversation

@e-mon
Copy link
Copy Markdown
Owner

@e-mon e-mon commented Mar 13, 2026

Summary

QMD path resolution fix

  • createRequire().resolve('@tobilu/qmd/package.json')ERR_PACKAGE_PATH_NOT_EXPORTED で失敗し、QMD インデックス更新が全滅していた
  • import.meta.resolve('@tobilu/qmd') + fileURLToPath に置き換え

Setup wizard improvements

  • アダプターごとにトークン入力 → 接続テストをインライン実行、失敗時にリトライ可能に
  • 有効化されたアダプターのみチャンネル読み込み
  • QMD モデルダウンロードをウィザード末尾に移動
  • initializeWorkspace を最後に1回だけ実行するようリファクタ
  • コードレビュー指摘7件を修正

Skill scan enhancements

  • skill scan<ref>(owner/repo, URL)を受け付け、インストール前にスキャンできるように変更。インストール済みスキルは --local で指定
  • LLM Advisory をデフォルトからオプトイン(--llm)に変更(ACP セッション起動で ~1分/スキルかかるため)
  • DEFAULT_SCAN_MODEL を無効な gemini-3.1-pro から pro(Gemini CLI エイリアス)に修正
  • README に Skills セクション(scan/install/manage ワークフロー)を追加

Test plan

  • ビルド通過
  • 全テスト通過 (551 tests)
  • geminiclaw skill scan anthropics/claude-agent-sdk-demos で静的スキャンが即完了することを確認
  • setup wizard の接続テスト・リトライ動作を確認
  • 実環境で QMD startup reindex が成功することを確認

🤖 Generated with Claude Code

e-mon and others added 8 commits March 13, 2026 21:52
…ath resolution

createRequire().resolve('@tobilu/qmd/package.json') fails with
ERR_PACKAGE_PATH_NOT_EXPORTED because QMD's exports map doesn't
include './package.json'. Switch to import.meta.resolve() which
uses ESM import conditions and resolves correctly without patching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… step

Each adapter step (Discord/Slack/Telegram) now collects tokens inline
instead of deferring to a separate "secrets" step. After saving the
token to the vault, a connection test validates the credential against
the platform API (Discord /users/@me, Slack auth.test, Telegram getMe).
Tests fail gracefully with a warning — they don't block setup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace one-shot token entry with a retry loop via collectAndTestToken().
On connection test failure, the user can re-enter the token or skip
(saving the current token anyway). This prevents typos from requiring
a full re-run of the setup wizard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
stepHome() now receives which adapters were enabled during the current
wizard run, skipping channel fetches for previously-enabled adapters
that weren't selected this time. Standalone --step home still loads
all enabled adapters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
initializeWorkspace now accepts { skipQmd } option. The setup wizard
skips QMD on the initial workspace init (Step 1) and runs it during
the final re-initialization with a descriptive spinner so users know
what's happening.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the duplicate initializeWorkspace call at the start of the
wizard. Workspace init, MCP server registration, and QMD model
download now run as the last step with a clear spinner message.
No more lite/skipQmd option — initializeWorkspace always runs fully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- S-1(setup): Sanitize Telegram token from error messages (URL path leak)
- L-1(setup): Replace magic string check with discriminated union
  ConnectionTestResult { ok, message/error }
- S-2(setup): Skip signingSecret prompt when Slack token is empty
- R-1(init): Deduplicate resolveQmdEntrypoint — export from qmd.ts
- E-1(init): Surface QMD collection add failure as warning instead of
  silently swallowing
- S-1(skills): Add process.exit(2) for danger results in stageSkill scan path
- S-2(skills): Use cleanupStaging() instead of raw rmSync in stageSkill catch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- skill scan now accepts <ref> (owner/repo, URL) to scan before installing
  instead of requiring an installed skill name. --local flag for existing skills.
- LLM advisory changed from default to opt-in (--llm) since it requires
  ACP session startup (~1min/skill). Static pattern scan is instant.
- Fix DEFAULT_SCAN_MODEL from invalid 'gemini-3.1-pro' to 'pro' (Gemini CLI alias)
- Add Skills section to README with scan/install/manage workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@e-mon e-mon changed the title fix(memory): replace createRequire with import.meta.resolve for QMD fix(memory): QMD path resolution + setup wizard improvements + skill scan Mar 13, 2026
@e-mon e-mon marked this pull request as ready for review March 13, 2026 14:14
@e-mon e-mon merged commit f06c544 into main Mar 13, 2026
4 checks passed
@e-mon e-mon deleted the fix/qmd-import-resolve branch March 13, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant