Skip to content

Fix CLI --help safety and @handle card lookup#218

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
naturedesk:fix-cli-help-and-handle-card
Jul 5, 2026
Merged

Fix CLI --help safety and @handle card lookup#218
senamakel merged 1 commit into
tinyhumansai:mainfrom
naturedesk:fix-cli-help-and-handle-card

Conversation

@naturedesk

@naturedesk naturedesk commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • short-circuit command-specific --help before context creation and dispatch, so mutation commands cannot execute when help is requested
  • resolve @handle to cryptoId before raw card / bare card GraphQL lookup

Linked issues

Fixes part of #216.
Addresses #217.

Verification

  • Not fully run: local corepack pnpm --filter @tinyhumansai/tinyplace lint and corepack pnpm --dir sdk/typescript exec tsc --noEmit were blocked by pnpm's build-script approval gate (ERR_PNPM_IGNORED_BUILDS).
  • Patch is limited to CLI dispatch and uses the existing resolveAgentId helper.

Summary by CodeRabbit

  • Bug Fixes
    • The CLI now shows help in more cases, including when the help flag is provided.
    • The card command now correctly recognizes agent IDs entered in common shorthand forms, improving command reliability.

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Vezures Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0fc6a93a-6d12-4cf0-97e6-5a457c4004b2

📥 Commits

Reviewing files that changed from the base of the PR and between e3f3194 and e862644.

📒 Files selected for processing (2)
  • sdk/typescript/src/cli/index.ts
  • sdk/typescript/src/cli/raw.ts

📝 Walkthrough

Walkthrough

This PR makes two small CLI fixes: dispatchCli's help detection now also triggers on a parsed help boolean flag, and dispatchRaw's card command resolves the agent ID via resolveAgentId before calling client.graphql.agentCard.

Changes

CLI Dispatch Fixes

Layer / File(s) Summary
Broaden help flag detection
sdk/typescript/src/cli/index.ts
The help-return conditional in dispatchCli now also returns HELP when boolFlag(parsed.flags, "help") is true, in addition to parsed.command === "--help".
Resolve agent ID for card command
sdk/typescript/src/cli/raw.ts
Imports resolveAgentId from ./workflows.js and awaits it to resolve the agentId argument before invoking client.graphql.agentCard in the card case.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

Poem

A hop, a flag, a help that's found,
Agent IDs resolved, safe and sound.
Two tiny fixes, quick and neat,
This rabbit's CLI dance is complete! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two main CLI fixes: safer --help handling and @handle card lookup resolution.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e862644156

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

parsed.command === "help" ||
parsed.command === "--help"
parsed.command === "--help" ||
boolFlag(parsed.flags, "help")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve forwarded wrapper help arguments

When running the wrapper commands, this global help check fires before the codex/claude dispatch below. Since parseArgs does not treat -- as an option terminator, invocations such as tinyplace codex -- --help or tinyplace claude -- --help now return TinyPlace's own help instead of forwarding --help to the underlying tool, even though the command usage documents arbitrary <codex-args...> / <claude-args...> after --.

Useful? React with 👍 / 👎.

@senamakel senamakel merged commit 0e58e5d into tinyhumansai:main Jul 5, 2026
9 of 10 checks passed
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.

2 participants