Document macdoc HTML to PDF route#31
Open
kiki830621 wants to merge 242 commits into
Open
Conversation
Axiomatization Systems — 跨領域形式化公理體系的建立、驗證與查詢。 基於 ASBE (Axiomatic Specification by Example) 方法論。 - 3 skills: axiom-create, axiom-validate, axiom-lookup - foundations/: cross-domain principles + ASBE methodology - templates/: ASBE domain template - domains/: 13 domains migrated from axiomatization_systems/ (asbe, apa7-style, statistics, decision-making, information-theory, language-learning, logic-and-language, mathematical-learning, weight-control, note-writing, philosophy, japanese-narrative, musical-composition)
… Safari + AppleScript Skill teaches Claude when to use safari-browser (login-required sites) vs agent-browser (headless/CI/public sites). SessionStart hook checks if CLI binary is installed at ~/bin/safari-browser. Source repo: PsychQuant/safari-browser
…tatus - New skill: idd-update maintains Current Status section in issue body - All other idd-* skills now auto-call idd-update at completion - Original issue content (Problem/Type/Expected) is never modified - References: added spectra-app skills for future idd-ingest design
…g, console levels, set media 36 commands total. Full parity with agent-browser on macOS.
…large, --output flags (#1)
…tput) and expanded limitations
… claude-code-guide - 新增 gemini-cli-guide skill(google-gemini/gemini-cli repo + geminicli.com) - codex-docs-guide: 改用 raw.githubusercontent.com 讀大檔案(>100KB) - claude-docs-guide → claude-code-guide(更精確的名稱) - marketplace.json 版本 1.3.1 → 1.4.0
新增 Gemini CLI 作為第三個驗證引擎(gemini -p, plan mode) 新增 'all' 模式:Codex + claude + Gemini 三引擎平行 - Codex: gpt-5.4 (xhigh) - claude: Opus 4.6 (max) - Gemini: 2.5 Pro (plan mode) 合併結果去重,標註來源
- 預設引擎改為 both(Codex + claude 平行) - --loop 改用 /ralph-loop:ralph-loop 驅動,取代內建迴圈 - completion-promise: 0 findings 時自動停止 - max-iterations 5
…igh) 原本 effort 自動選擇依 diff 大小,但實際使用時 Codex 常不是用 xhigh。 改為預設一律最高 effort,加入明確的三引擎映射表。
…erification Default: 6 independent AIs, 2 model families, cross-verification. Agent Team (5 Claude teammates in one team): - Requirements: issue coverage check - Logic: correctness, edge cases, null handling - Security: injection, secrets, permissions - Regression: scope creep, breaking changes - Devil's Advocate: challenges other 4's "pass" judgments + Codex CLI (gpt-5.4 xhigh): completely independent, blind review Findings merged, deduplicated, severity = max across sources.
…odex launch - Remove hardcoded model: sonnet from all 5 reviewers (inherit parent model) - Strengthen Step 2 instruction: 6 tool calls must be in single message
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…gent, hooks, and breadth-first sorry elimination
…kill, fix hooks format - rules/mathlib-api.md: Mathlib v4.28.0 API lookup table - rules/lean-imports.md: theorem citation discipline - rules/lean-references.md: import vs axiom rules - skills/codex-prove-assist: smart delegation (Claude analyzes, Codex searches) - Fix: hooks moved from plugin.json to hooks/hooks.json - Updated CLAUDE.md with full component list
Scans existing plugin structure, finds missing components, imports rules/skills from related projects, fixes hook format, and auto-deploys the upgraded version.
…o-install after build
…Discussions - Support: #issue list, source:filename, milestone:name - @tag users at the end of report - Posts to GitHub Discussions (create or update) - Non-technical language, blockquote originals, quantified results - v2.9.0 → v2.10.0
Triple lib-only release picking up ooxml-swift v0.21.9: - #87 Comment.paragraphIndex flat-counter (observable behavior change) - #93 wrap_caption_seq SEQ inherits source position - #94 update_all_fields traverses .table and .contentControl 5 follow-up child issues filed in PsychQuant/ooxml-swift#24-#28. Verified by 6-AI ensemble (5 Claude reviewers + Codex gpt-5.5 xhigh).
…er canonical fix)
…igration NEW scripts/process-attachments.sh helper(3 commands: download/check/verify) + rules/process-attachments.md(thin rule + iron rules)。 Closes recurring gap: gh issue view --json doesn't return attachment content; IDD skills had zero attachment handling → diagnosis missed source-of-truth (see kiki830621/collaboration_liu-thesis-analysis#21). Design: - Mechanical work(curl/jq/sha256/manifest)in helper script — shell calls always execute,doc links don't always get followed - Parsing(docx→text)stays with Claude using MCP tools(che-word-mcp / che-pdf-mcp / Read for images)— LLM is needed for content reasoning - Storage fixed at .claude/.idd/attachments/issue-NNN/ with _manifest.json containing {filename, url, sha256, size_bytes} Skill changes: - idd-diagnose Step 1.5 → bash …/process-attachments.sh download - idd-implement Step 1.2 → bash …/process-attachments.sh check - idd-verify Step 1.5 → bash …/process-attachments.sh check + reviewer prompt - idd-close Step 1.4 → bash …/process-attachments.sh verify Namespace migration(backward compat): - .claude/issue-driven-dev.local.* → .claude/.idd/local.* - .claude/state/idd-bridge.json → .claude/.idd/state/bridge.json - references/config-protocol.md walk-up reads new path first, fallback to legacy + .md frontmatter - rules/spectra-bridge.md bookmark path updated + Hard rule #6 added Iron rules: - Download mandatory upstream - Reference by path never URL - Failure must be visible - Downstream never auto-repairs upstream - Storage location fixed - Script is source of truth(SKILL.md doesn't inline curl/jq logic)
Adapt nsql Confirmation Protocol (/Users/che/Developer/nsql) to Apple Mail operations. Prevent false-positive archives by adding 4-phase confirmation loop: disambiguation → search preview → operation confirmation → execute. Real case motivating this upgrade (2026-05-01): archiving "陳老師" emails fetched 19 messages but 1 was a sibling activity (寄給 scchen, not cchen), caught only after writing all markdown files. With the new protocol, the search preview phase flags this as ⚠ false positive and asks user to exclude before any side effect. New components: - skills/confirmation-protocol/ — 4-phase workflow - skills/email-search-disambiguation/ — vague filter resolution (E1-E5) - skills/bulk-operation-preview/ — search preview + false-positive flagging - rules/confirmation-triggers.md — when to confirm vs skip - rules/false-positive-detection.md — sibling activity / CC pollution / subject collision - CLAUDE.md — plugin overview + design philosophy archive-mail.md gets Step 1.5 (Phase 1) and Step 4.5 (Phase 2+3) inserted. Backward compatible: explicit email filter still skips Phase 1.
統一所有 mail 工作流的 config + state 到 .claude/.mail/ 子目錄,
學 IDD v2.35.0 的 .claude/.idd/ namespace 收斂 pattern。
舊 layout (v2.7.0 ↓):
.claude/emails.md (config 散在 root)
{output_dir}/.email_index.json (state 散在 archive output)
{output_dir}/.threads.json
新 layout (v2.8.0+):
.claude/.mail/config.md (config 集中)
.claude/.mail/state/archives/{slug}/email_index.json (state 集中,per-target)
.claude/.mail/state/archives/{slug}/threads.json
{output_dir}/2026-01-13_xxx.md (archive markdown 不動)
理由:idd 收斂 .claude/.idd/ 之後 user 一看就知道「這些是 IDD 的東西」;
mail 同樣應該收斂讓 namespace 不散在多處。Archive markdown 仍在 user 預期
位置(.claude/.mail/ 只放 plugin 自己管的 metadata)。
新 command:
- /archive-mail-migrate — 一次性 batch migrate 舊 archive targets,支援
--dry-run 預覽
archive-mail / view / rebuild-threads 都加 silent auto-migrate(每次跑時
若新位置不存在但舊位置有 file,自動 mv 過去並提示)。
Backward compatible:legacy paths 自動 detect,不需要 user 手動操作。
… Plan / Spectra) + new idd-plan skill
Adds Plan tier between Simple and Spectra (formerly SDD-warranted). Plan covers
the common case where Simple is too thin (multi-step / multi-file / decision-heavy
/ risk-sensitive) but Spectra is overkill (no published API contract for future
callers). Plan path inserts EnterPlanMode approval gate between diagnosis and
TDD execution.
## Tier verdicts (3-tier, was 2-tier)
- Simple → /idd-implement #N (direct TDD)
- Plan (NEW) → /idd-plan #N (EnterPlanMode → user approves Implementation Plan
→ ExitPlanMode → chain to idd-implement)
- Spectra → /spectra-discuss → spectra-propose → spectra-apply
(rename from SDD-warranted; backward-compat alias preserved)
## Routing logic (4-layer evaluation, in rules/sdd-integration.md)
1. Layer 1 disqualifiers (any one) → force Simple, stop
2. Layer 2 + Layer 3 (both required) → Spectra
3. Layer P (any one of: 2+ interdependent files / 5+ ordered steps /
decision-heavy / risk-sensitive boundary / internal-only refactor) → Plan
4. Else → Simple (default)
Plan-Spectra discriminator: "published API/protocol for future callers".
- Internal refactor across 5 files → Plan
- New MCP tool / plugin skill / public Swift API → Spectra
- Spec MUST/SHALL clause change → Spectra
## Touched files (10 modified, 1 new)
- rules/sdd-integration.md — rewrite triage to 4-layer, document Plan tier,
Plan-Spectra discriminator table, retrospective check expanded
- skills/idd-diagnose/SKILL.md — Step 3.5 evaluates 4 layers, Step 4 routing
handles 3 paths, Next Step section updated
- skills/idd-implement/SKILL.md — Step 2.5 recognizes Simple/Plan/Spectra
+ SDD-warranted alias, Plan case prompts user if not entered via /idd-plan
- skills/idd-all/SKILL.md — Phase 3 Plan path degrades to Simple under
unattended (final report flags "Plan tier deliberation skipped")
- skills/idd-list/SKILL.md — NEXT mapping for diagnosed phase becomes
Complexity-aware (parses ### Complexity from latest diagnosis comment)
- skills/idd-update/SKILL.md — phase enum gains "planning" mid-state
- skills/idd-plan/SKILL.md (NEW) — full Plan tier skill: read diagnosis →
draft detailed Implementation Plan (decision points + risk mitigations +
sequencing + out-of-scope) → post to issue → EnterPlanMode → ExitPlanMode →
approve/revise/abort → chain to idd-implement
- CLAUDE.md — Skills table includes idd-plan, SDD section rewritten as
"3-tier routing" with Complexity table + flow per tier
- MANIFESTO.md — Anti-pattern section updated to reflect 3-tier verdict
+ 4-layer evaluation, motivating example che-word-mcp#104 added
- plugin.json + marketplace.json — version 2.35.0 → 2.36.0, descriptions
rewritten to reflect 3-tier routing
## Backward compat
- "SDD-warranted" diagnosis comments parse as "Spectra" — no rewrite needed
- Existing Simple / Spectra paths unchanged
- /idd-implement still works for Plan-tier issues (with prompt suggesting
/idd-plan instead, but allowed for escape-hatch usage)
## Motivation
- Spectra over-trigger: kiki830621/collaboration_liu-thesis-analysis#21
retrospective showed cross-file research analysis was getting bumped to
Spectra by Layer 3 supplementary signals despite no caller contract
- Simple under-served: PsychQuant/che-word-mcp#104 P1 sub-bug (Run.toXML
rawXML short-circuit) would have been caught by Plan-tier approval gate
reviewing the Implementation Plan, saving the post-verify cleanup commit
Closes the "SDD too frequent" feedback by introducing the missing middle
tier instead of loosening Spectra criteria.
…Parser canonical fix)
Adopt IDD's Step 0 Bootstrap Stage Task List 鐵律 to upgrade v2.7.0
spec-level confirmation to enforce-level. Without TaskCreate tracking,
Claude can rationalize away phases ("應該還好吧") and silently skip
false-positive scan or Phase 2 preview.
Two enforced bootstraps:
- commands/archive-mail.md Step 0: 10 stage tasks
(resolve_filter_and_paths / phase1_disambiguation /
load_indices_and_config / search_emails /
filter_and_scan_false_positives / phase2_3_preview_and_confirm /
fetch_and_write_markdown / download_and_classify_attachments /
update_indices / report_and_audit)
- skills/confirmation-protocol/SKILL.md Bootstrap: 4 phase tasks
(disambiguation / search_preview /
operation_confirmation / execute_or_iterate)
Skippable phases (e.g., Phase 1 with explicit email filter) must still
TaskUpdate→completed with skip reason in description. Silent completion
= violation.
rules/false-positive-detection.md: scan promoted from optional best
practice to required Step 0 task. References 2026-05-01 incident where
spec-level rule was bypassed and 265250 false positive leaked.
Three versions of changes were missing from README: - v2.7.0: 3 skills (confirmation-protocol / email-search-disambiguation / bulk-operation-preview), 4-phase NSQL confirmation workflow - v2.8.0: /archive-mail-migrate command, .claude/.mail/ namespace with auto-migrate - v2.9.0: Step 0 Bootstrap Stage Task List enforcement (TaskCreate harness for archive-mail and confirmation protocol) Add Version History section so future drift is visible.
Plugin shell that wires PsychQuant/agent-cacher (Mode B explicit-lookup cache) into Claude Code as an MCP server. - .mcp.json registers `agent-cacher` MCP server - bin/cacher-mcp-wrapper.sh auto-downloads cacher + cacher-mcp from PsychQuant/agent-cacher v0.1.0 release on first invocation - Source builds in ~/Developer/agent-cacher/.build/release/ are preferred when present and never overwritten Tools exposed: cache.lookup, cache.fetch, cache.recent, cache.diff.
…migration guide for inline mode)
kiki830621
added a commit
that referenced
this pull request
May 21, 2026
Two findings independently flagged by Codex (gpt-5.5) and the Devil's Advocate reviewer in /idd-verify ensemble. Both are in-scope per idd-verify Step 5a (本 issue 範圍但非阻擋性), so fixing within this PR-1 rather than spawning follow-ups. 1. recoveryCommand `&&` semantics bug (Codex P2 / DA Challenge #5): `pkill X && rm -rf <lock>` short-circuits when no X process exists. But that's exactly the orphan-lock case (crashed wrapper) — where the user most needs the lock cleanup to run. Changed `&&` to `; ` so both steps run regardless. Also extended `rm -rf` target to include `.lock.flock` (Linux flock-mode lock file) so the same recovery works on macOS and Linux. Fix appears in: - wrapper.sh:121 (recoveryCommand JSON field) - README.md:201-212 (recovery cookbook bash block) 2. README ## Version section drift (Codex P2): README line 234 still said `Plugin version: 1.3.0` after the v1.3.2 plugin.json/marketplace.json/CHANGELOG.md bump. Internal contradiction caught by Codex but missed by all 5 Claude reviewers (they checked the three-way sync between plugin.json / marketplace.json / CHANGELOG.md but didn't notice README has a fourth version reference). Updated to 1.3.2 and added v1.3.2 + v1.3.1 entries to README's inline changelog section. Tests still 4/4 GREEN after fix (test #4 just asserts `recoveryCommand starts with 'pkill'` which both `&&` and `; ` forms satisfy). Refs #31
Merged
5 tasks
kiki830621
added a commit
that referenced
this pull request
May 21, 2026
Empirical 2-session test in Claude Code (2026-05-22) confirmed Codex P1 + Devil's Advocate Challenge #1 prediction: Claude Code's MCP transport drops `id: null` JSON-RPC error responses as unmatched-id transport noise, even when the wrapper writes a perfectly-valid envelope to stdout. Result: user still sees generic `-32000`, not the human-readable error.message. Empirical test methodology (preserved for future reference): 1. cp plugin v1.3.2 wrapper into ~/.claude/plugins/cache/.../1.3.1/bin/ (override cached v1.3.1 wrapper in-place, no marketplace merge needed) 2. Open fresh Claude Code session; run /mcp 3. Observe: still `-32000`. ps shows fresh wrapper.sh processes were spawned (sub-100ms lifecycle), but Claude Code rendered the cached transport failure, not our envelope. 4. Manually invoke the swapped wrapper: it correctly emits valid JSON envelope to stdout — proving the issue is client-side rendering, not server-side emission. Fix (this commit): - New helper `read_initialize_id()`: reads first line of stdin with 2s timeout, extracts the initialize request's id field. Prefers jq for parsing; falls back to bash regex for environments without jq. Returns "null" literal on timeout / parse failure / missing id, so downstream behavior degrades to v1.3.2 fallback (better than -32000 baseline; same as before this commit). - Extended `emit_mcp_error_response(owner_pid, request_id)` to take request_id as second arg, substituted into JSON envelope `"id":<x>`. Numeric id printed unquoted, string id with JSON quotes, null literal. - Both lock-refused branches (flock + mkdir) now call read_initialize_id before emit_mcp_error_response, so the response id matches the request Claude Code's MCP client has pending. Tests: - Updated fake wrapper template to source both helpers + new call sequence - New test #5: feed `{"id":42, ...}` initialize to stdin → response.id == 42 - New test #6: empty stdin → falls back to null (preserves v1.3.2 behavior) - Existing tests #1-4 still GREEN (timeout fallback covers the no-stdin path identically to v1.3.2's hardcoded null) - Regression: test-wrapper-pid.sh 10/10 GREEN (unaffected — different lock state focus) - Manual canary: string id "abc-init-99" round-trips correctly Why 2-second stdin timeout: - Claude Code MCP transport sends initialize within ms of process spawn - Longer timeout (>5s) risks Claude Code's own transport timeout firing first and giving up on the wrapper - Shorter timeout (<1s) risks race with slow shell init on busy hosts - 2s = sweet spot per JSON-RPC over stdio convention Why jq + bash-regex fallback: - jq isn't a guaranteed plugin-runtime dependency - bash regex covers integer ids and quoted-string ids — the only forms MCP 1.0 + JSON-RPC 2.0 specs allow for `id` - Pre-PR-1b plan acknowledged this 2-step empirical approach explicitly: ship simple null-id first, observe Claude Code behavior, escalate to read-stdin only if needed. The escalation triggered today, as predicted. Refs #31
kiki830621
added a commit
that referenced
this pull request
May 22, 2026
…cal findings (#31) Updates the v1.3.2 entry to capture: - Full envelope schema (code / message / data fields) - PR-1b read_initialize_id() rationale: empirical 2-session test in Claude Code v2.1.148 showed id:null responses don't surface; matching id required + verified via --debug mcp log capture - Stdin id extraction strategy (jq + bash regex fallback for portability) - Test coverage expanded 4→6 cases - Known UX gap explicitly documented: /mcp short-list still shows truncated -32000, but the full error.message reaches Claude Code's internal MCP error state (proven via debug log line 1295) - Bumped date 2026-05-21 → 2026-05-22 to reflect PR-1b ship date This commit only touches CHANGELOG.md, no code changes. Refs #31
kiki830621
added a commit
that referenced
this pull request
Jul 5, 2026
… tools) Bridges 3 versions: v3.2.0 (LaTeX parser delegation, closes #22) + v3.3.0 (Phase 2A theme/header/footer/watermark tools, closes #26 #27 #28) + v3.4.0 (Phase 2B+2C comment-thread/people/notes/web-settings, closes #24 #25 #29 #30 #31). Underlying ooxml-swift bumped to 0.12.x with preserve-by-default round-trip architecture (closes #23 P0). Total: 171+ MCP tools (was 148).
kiki830621
added a commit
that referenced
this pull request
Jul 5, 2026
…sal (#31) When two Claude Code sessions race for the TDLib single-instance lock, the second wrapper now emits a JSON-RPC 2.0 error envelope to stdout before exiting, so Claude Code's MCP client surfaces a human-readable message instead of generic "-32000 Server error". Changes: - Add emit_mcp_error_response() helper that prints a spec-valid {"jsonrpc":"2.0","id":null,"error":{...}} envelope. The message field carries the lock holder PID + recovery instructions; data field carries machine-readable lockHolderPid, recoveryCommand, and docsUrl. - Call helper from both flock and mkdir lock-refused branches. Stderr message retained for direct-shell debug. - New test-wrapper-mcp-error.sh covers 4 cases: - happy path (no lock) — exits 0, no stdout - lock refused (alive PID) — emits valid JSON to stdout, exit 1 - stale lock (dead PID) — self-recovers, no stdout - JSON envelope includes recoveryCommand starting with "pkill" id=null is JSON-RPC 2.0 spec-valid; if Claude Code's MCP client doesn't match null-id responses to pending initialize requests, a follow-up PR will add read-stdin-extract-id-then-respond logic. That decision waits for empirical signal from the verify step (manual two-session reproduction). Refs #31
kiki830621
added a commit
that referenced
this pull request
Jul 5, 2026
…rsion bumps (#31) - plugins/che-telegram-mcp/README.md: add "## Multi-session limitation" section between Available Tools and Permissions. Explains TDLib single-instance constraint, what v1.3.2+ users see in /mcp, and the manual recovery cookbook (pkill + rm lock dir). - plugins/che-telegram-mcp/CHANGELOG.md: KAC-format v1.3.2 entry under Fixed + Documentation sections. - plugins/che-telegram-mcp/.claude-plugin/plugin.json: bump 1.3.1 → 1.3.2, description appended with one-line v1.3.2 summary. - .claude-plugin/marketplace.json: sync che-telegram-mcp entry version + description (keeps marketplace in step with plugin manifest). Refs #31
kiki830621
added a commit
that referenced
this pull request
Jul 5, 2026
Two findings independently flagged by Codex (gpt-5.5) and the Devil's Advocate reviewer in /idd-verify ensemble. Both are in-scope per idd-verify Step 5a (本 issue 範圍但非阻擋性), so fixing within this PR-1 rather than spawning follow-ups. 1. recoveryCommand `&&` semantics bug (Codex P2 / DA Challenge #5): `pkill X && rm -rf <lock>` short-circuits when no X process exists. But that's exactly the orphan-lock case (crashed wrapper) — where the user most needs the lock cleanup to run. Changed `&&` to `; ` so both steps run regardless. Also extended `rm -rf` target to include `.lock.flock` (Linux flock-mode lock file) so the same recovery works on macOS and Linux. Fix appears in: - wrapper.sh:121 (recoveryCommand JSON field) - README.md:201-212 (recovery cookbook bash block) 2. README ## Version section drift (Codex P2): README line 234 still said `Plugin version: 1.3.0` after the v1.3.2 plugin.json/marketplace.json/CHANGELOG.md bump. Internal contradiction caught by Codex but missed by all 5 Claude reviewers (they checked the three-way sync between plugin.json / marketplace.json / CHANGELOG.md but didn't notice README has a fourth version reference). Updated to 1.3.2 and added v1.3.2 + v1.3.1 entries to README's inline changelog section. Tests still 4/4 GREEN after fix (test #4 just asserts `recoveryCommand starts with 'pkill'` which both `&&` and `; ` forms satisfy). Refs #31
kiki830621
added a commit
that referenced
this pull request
Jul 5, 2026
Empirical 2-session test in Claude Code (2026-05-22) confirmed Codex P1 + Devil's Advocate Challenge #1 prediction: Claude Code's MCP transport drops `id: null` JSON-RPC error responses as unmatched-id transport noise, even when the wrapper writes a perfectly-valid envelope to stdout. Result: user still sees generic `-32000`, not the human-readable error.message. Empirical test methodology (preserved for future reference): 1. cp plugin v1.3.2 wrapper into ~/.claude/plugins/cache/.../1.3.1/bin/ (override cached v1.3.1 wrapper in-place, no marketplace merge needed) 2. Open fresh Claude Code session; run /mcp 3. Observe: still `-32000`. ps shows fresh wrapper.sh processes were spawned (sub-100ms lifecycle), but Claude Code rendered the cached transport failure, not our envelope. 4. Manually invoke the swapped wrapper: it correctly emits valid JSON envelope to stdout — proving the issue is client-side rendering, not server-side emission. Fix (this commit): - New helper `read_initialize_id()`: reads first line of stdin with 2s timeout, extracts the initialize request's id field. Prefers jq for parsing; falls back to bash regex for environments without jq. Returns "null" literal on timeout / parse failure / missing id, so downstream behavior degrades to v1.3.2 fallback (better than -32000 baseline; same as before this commit). - Extended `emit_mcp_error_response(owner_pid, request_id)` to take request_id as second arg, substituted into JSON envelope `"id":<x>`. Numeric id printed unquoted, string id with JSON quotes, null literal. - Both lock-refused branches (flock + mkdir) now call read_initialize_id before emit_mcp_error_response, so the response id matches the request Claude Code's MCP client has pending. Tests: - Updated fake wrapper template to source both helpers + new call sequence - New test #5: feed `{"id":42, ...}` initialize to stdin → response.id == 42 - New test #6: empty stdin → falls back to null (preserves v1.3.2 behavior) - Existing tests #1-4 still GREEN (timeout fallback covers the no-stdin path identically to v1.3.2's hardcoded null) - Regression: test-wrapper-pid.sh 10/10 GREEN (unaffected — different lock state focus) - Manual canary: string id "abc-init-99" round-trips correctly Why 2-second stdin timeout: - Claude Code MCP transport sends initialize within ms of process spawn - Longer timeout (>5s) risks Claude Code's own transport timeout firing first and giving up on the wrapper - Shorter timeout (<1s) risks race with slow shell init on busy hosts - 2s = sweet spot per JSON-RPC over stdio convention Why jq + bash-regex fallback: - jq isn't a guaranteed plugin-runtime dependency - bash regex covers integer ids and quoted-string ids — the only forms MCP 1.0 + JSON-RPC 2.0 specs allow for `id` - Pre-PR-1b plan acknowledged this 2-step empirical approach explicitly: ship simple null-id first, observe Claude Code behavior, escalate to read-stdin only if needed. The escalation triggered today, as predicted. Refs #31
kiki830621
added a commit
that referenced
this pull request
Jul 5, 2026
…cal findings (#31) Updates the v1.3.2 entry to capture: - Full envelope schema (code / message / data fields) - PR-1b read_initialize_id() rationale: empirical 2-session test in Claude Code v2.1.148 showed id:null responses don't surface; matching id required + verified via --debug mcp log capture - Stdin id extraction strategy (jq + bash regex fallback for portability) - Test coverage expanded 4→6 cases - Known UX gap explicitly documented: /mcp short-list still shows truncated -32000, but the full error.message reaches Claude Code's internal MCP error state (proven via debug log line 1295) - Bumped date 2026-05-21 → 2026-05-22 to reflect PR-1b ship date This commit only touches CHANGELOG.md, no code changes. Refs #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
macdoc convert --to pdffor HTML/HTM input as a playwright Chromium route.Verification
jq empty plugins/macdoc/.claude-plugin/plugin.json .claude-plugin/marketplace.jsonrg "HTML→PDF|playwright Chromium|playwright install chromium" plugins/macdoc/skills/macdoc/SKILL.md plugins/macdoc/.claude-plugin/plugin.json .claude-plugin/marketplace.jsongit diff --checkRefs PsychQuant/macdoc#85