Skip to content

feat(cli): add wspc tour command#70

Merged
yurenju merged 1 commit into
mainfrom
claude/tour-guide
Jul 1, 2026
Merged

feat(cli): add wspc tour command#70
yurenju merged 1 commit into
mainfrom
claude/tour-guide

Conversation

@yurenju

@yurenju yurenju commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Adds a handwritten wspc tour command that fetches the guided-tour script and prints it for the agent to follow.

Behavior

  • Fetches https://mcp.wspc.ai/guide (public, unauthenticated; overridable via WSPC_GUIDE_URL for local dev), then prints the script to stdout.
  • TTY-gated hint: in an interactive terminal it writes a one-line note to stderr reminding you the script is for your AI agent; when piped/captured by an agent it prints only the script on stdout, so nothing pollutes the agent's context.
  • Errors surface cleanly via the existing top-level dispatch catch (error: tour_fetch_failed: <status>, exit 1).

Pairs with

The /guide endpoint and guide_start MCP tool are in the wspc monorepo (separate PR). This command consumes the same WSPC_GUIDE text over HTTP, so there is a single source of truth.

Test plan

  • npm test -- tour cli-root — 6 passing (resolveGuideUrl default/override, fetchGuide 200/non-2xx, wspc --help lists tour).
  • npm run typecheck — clean.
  • Manually verified against a local /guide: piped run prints only the script (no hint on stdout).

@yurenju yurenju merged commit 72724f1 into main Jul 1, 2026
2 checks passed
@yurenju yurenju deleted the claude/tour-guide branch July 1, 2026 09:20
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