Skip to content

feat: Add command field to terminal agent templates#88

Merged
2witstudios merged 3 commits intomainfrom
pu/terminal-templates
Mar 7, 2026
Merged

feat: Add command field to terminal agent templates#88
2witstudios merged 3 commits intomainfrom
pu/terminal-templates

Conversation

@2witstudios
Copy link
Owner

Summary

  • Add command field to agent defs, templates, protocol, engine, CLI, and macOS app so terminal-type agents can specify a shell command to run
  • Fix whitespace-only command bug in AgentsHubView (trim before isEmpty check)
  • Extract shared substitute_vars helper in Rust template module to deduplicate render/render_command
  • Deduplicate agent type string lists into AgentTypes enum in Swift

Test plan

  • cargo test -p pu-core — all 28 template tests pass
  • Xcode build — verify Swift changes compile
  • Create a terminal agent def with command via CLI and verify it spawns correctly
  • Create a prompt template with command in macOS app, verify whitespace-only command is treated as nil

🤖 Generated with Claude Code

Add a `command` field across agent defs, templates, protocol, engine,
CLI, and macOS app so terminal-type agents can specify a shell command
to run. Includes code review fixes: whitespace trimming on command
input, extracted shared variable substitution helper in Rust, and
deduplicated agent type lists into AgentTypes enum in Swift.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link

coderabbitai bot commented Mar 7, 2026

Warning

Rate limit exceeded

@2witstudios has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3901f895-d2b9-4db5-be3a-9635477c199f

📥 Commits

Reviewing files that changed from the base of the PR and between e008611 and e6930af.

📒 Files selected for processing (21)
  • apps/purepoint-macos/purepoint-macos/Models/AgentsHubModels.swift
  • apps/purepoint-macos/purepoint-macos/Models/ManifestModel.swift
  • apps/purepoint-macos/purepoint-macos/Models/WorkspaceModel.swift
  • apps/purepoint-macos/purepoint-macos/Services/DaemonClient.swift
  • apps/purepoint-macos/purepoint-macos/State/AgentsHubState.swift
  • apps/purepoint-macos/purepoint-macos/State/ProjectState.swift
  • apps/purepoint-macos/purepoint-macos/Views/Agents/AgentCreationSheet.swift
  • apps/purepoint-macos/purepoint-macos/Views/Agents/AgentsHubView.swift
  • apps/purepoint-macos/purepoint-macos/Views/Agents/PromptCreationSheet.swift
  • apps/purepoint-macos/purepoint-macosTests/DaemonClientParseTests.swift
  • crates/pu-cli/src/commands/agent_def.rs
  • crates/pu-cli/src/commands/prompt.rs
  • crates/pu-cli/src/commands/spawn.rs
  • crates/pu-cli/src/main.rs
  • crates/pu-cli/src/output.rs
  • crates/pu-core/src/agent_def.rs
  • crates/pu-core/src/protocol.rs
  • crates/pu-core/src/template.rs
  • crates/pu-core/src/types.rs
  • crates/pu-engine/src/engine.rs
  • crates/pu-engine/src/test_helpers.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pu/terminal-templates

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 and usage tips.

2witstudios and others added 2 commits March 7, 2026 09:12
Add #[allow] attributes to resolve_prompt (complex return type) and
handle_save_template (8 params) to pass CI clippy with -D warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DaemonClientParseTests was pattern-matching templateDetail with 6 fields
but the enum now has 7 (command added). Fixes macOS build CI failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@2witstudios 2witstudios merged commit 18be5c0 into main Mar 7, 2026
5 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.

1 participant