LifeOSHooks/RichFormat types: setup names only claude-code.d.ts (claude-code-tools.d.ts also needed), mod-types skips when declarations are absent, RichFormat test fails tsc on 2.1.322
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- developer-experience, testing, tooling
Hướng nghiên cứu
Start with LIFEOS/TOOLS/IntegrityCheck.ts and checkModTypes, then review the named setup docs and type declarations in skills/LifeOSHooks and skills/RichFormat. Reproduce the reported tsc failures on Claude Code 2.1.322 with the stated declaration files. Done when setup names both required files, mod-types detects installed mods missing declarations, and the RichFormat test typechecks.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
LifeOS 8.761.0, Claude Code 2.1.322, Linux. Both mods (LifeOSHooks, RichFormat) loaded from the skills folder.
1. Setup names one declaration file; the hooks module needs two
skills/LifeOSHooks/SKILL.md (§ After a Claude Code update), skills/LifeOSHooks/Setup.md and the mod-types fix text in LIFEOS/TOOLS/IntegrityCheck.ts name only claude-code.d.ts. With only that file in .claude/types/, tsc -p skills/LifeOSHooks reports 32 errors, all in hooks/LifeOSHooks.ts, for example:
TS2367: This comparison appears to be unintentional because the types '"Agent" | "AskUserQuestion" | "Glob" | ...' and '"Bash"' have no overlap(line 1270)TS2339: Property 'command' does not exist on type 'never'(line 1373)
BuiltinToolInputs is empty until the engine's second file, claude-code-tools/index.d.ts, merges into it. Copying .claude-plugin/types/claude-code-tools/index.d.ts (which the engine lays beside the mod) to .claude/types/claude-code-tools.d.ts makes tsc exit 0 on 2.1.322.
Suggested fix: name both files wherever the declarations step is described. The engine's copies in .claude-plugin/types/ are also an easier source than the plugin-authoring skill folder; skills/RichFormat/Setup.md already points there.
2. mod-types reports "no function-hooks mods installed" when both are installed
checkModTypes recognises a mod by the presence of types/claude-code.d.ts or .claude/types/claude-code.d.ts. The release ships neither, so a fresh install shows ✓ mod-types skipped — no function-hooks mods installed while both mods are loaded, and the check that should flag declarations missing or stale for the running build never runs.
Suggested fix: find mods by hooks/hooks.json carrying modules (or by the plugin manifest), and report missing declarations as a non-blocking finding.
3. RichFormat tests/engine.test.tsx does not typecheck on 2.1.322
With both declaration files in skills/RichFormat/types/, tsc -p skills/RichFormat reports 4 × TS2345 at lines 38, 49, 63 and 89: Argument of type 'Engine' is not assignable to parameter of type '{ prompt: { compose: (e: unknown) => Promise<unknown>; }; }'. The helper interactive($: { prompt: { compose: (e: unknown) => Promise<unknown> } }, on) declares a parameter wider than PromptComposeInput, which strict function types reject. Typing $ as Engine (or compose: (e: never) => Promise<unknown>) clears it. hooks/ itself is clean.
- Ngôn ngữ chính
- TypeScript
- Star
- 19.9k
- Fork
- 2.5k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của danielmiessler/LifeOS
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
danielmiessler/LifeOS#2894 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
danielmiessler/LifeOS#2891 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
danielmiessler/LifeOS#2888 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
danielmiessler/LifeOS#2886 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
danielmiessler/LifeOS#2848 ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của danielmiessler/LifeOS
Issue tương tự
-
[功能请求] 设置选项语言调整Đang mở功能请求
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
antithesishq/bombadil#473 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
The structured output reference promises null results for refusals that carry validation detailsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
mattermost/mattermost-mobile#10358 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ready-for-agent
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
LucasSantana-Dev/Lucky#3257 ·
Maintainer thường phản hồi trong vòng 1 ngày