Tools published by the user and stored at ~/.cmdforge/<name>/ (no owner
subdir) had no way to resolve the registry owner, so get_tool_registry_info
returned None and the rating bar was hidden. Added fallback_owner parameter
that uses the current user's slug when no owner can be determined from the
path or config.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Own tools now display the rating bar (average, count) so authors can
see how their tool is rated. The Rate button is hidden entirely for
own tools rather than shown disabled, since the server enforces the
self-review restriction anyway.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of the Rate button sitting in the action bar with Create/Edit/Delete,
the average rating, review count, and Rate/Edit Rating button now appear as
a bar at the bottom of the tool detail section where they contextually belong.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Registry:
- Add owner and rating sort options to both server endpoints
- Add letter-based prefix filtering (A-Z, #) with server-side validation
- LEFT JOIN tool_stats for average_rating/rating_count in responses
- Add interactive numbered page buttons with sliding window and ellipsis
- Add letter bar UI (shown when sorting by name) with highlight state
- Auto-select asc/desc order based on sort field
- Disable cell editing on results table
- Client: add order and prefix params to list_tools/search_tools
Code step dialog:
- Split AI prompt into user instruction input and collapsible wrapper
- User types plain instruction, wrapper is hidden by default
- Injection of user text into wrapper via {user_instruction} placeholder
- Increase dialog minimum height to 750px
Runner:
- Support variable substitution in prompt step provider name
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Registry:
- Add admin owner override for publishing tools as "official"
- Add POST /api/v1/tools/status-by-hash batch endpoint for status lookup
scoped to publisher_id (works for tools published under any owner)
GUI:
- Add "Publish as" dropdown in publish dialog for admin users
- Add "installed" tool state (teal with arrow indicator) for registry-installed tools
- Fix tool editing for official/* qualified tool names (_get_qualified_name helper)
- Fix cancel navigation returning to wrong page (Welcome instead of Tools)
- Fix collections tab not refreshing after publish
- Refactor StatusSyncWorker to use batch hash lookup (1 request instead of N)
with chunking (100 max) and hash collision handling
CLI:
- Switch registry status sync to hash-based lookup
- Add collection dependency checking and unpublished dep detection
Publish dialog cleanup:
- Move yaml import to module level, remove duplicate _bump_patch_version
- Fix owner combo using currentText() for reliable selection
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools can now declare system-level package dependencies (apt, brew, pacman, dnf)
that get checked and optionally installed when the tool is installed or run.
Features:
- SystemDependency dataclass with short form (string) and long form (dict)
- New system_deps.py module with platform detection and installation
- `cmdforge system-deps <tool>` command to check/install system packages
- `cmdforge check` now shows both CmdForge and system dependencies
- `cmdforge registry install` prompts for system dep installation
- GUI: System Dependencies section in Tool Builder with add/edit dialog
- Runner warns about missing system deps before execution
- Integration with project install (manifest and lock-based)
Also includes:
- Quote paths in wrapper scripts for spaces support
- Tests for value type preservation in code steps
- Unskip invalid tool name test
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tools can now ship with defaults.yaml containing configurable settings
that users can customize via settings.yaml (auto-created from defaults).
Features:
- ensure_settings() helper copies defaults to settings on first use
- Settings available as {settings.key} in templates (scalars only)
- Full dict access via settings['key'] in code steps
- CLI: cmdforge settings <tool> show/edit/reset/diff
- GUI: Defaults editor in Tool Builder, Configure button on Tools page
- Registry: defaults.yaml published with tools, included in downloads
- Secret detection warning on publish (api_key, password, token, etc.)
Fully backward compatible - tools without defaults work unchanged.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Make section compact (doesn't stretch to fill space)
- Add stretch at bottom of left panel to push content up
- Reduce list height slightly (80px max, 60px min)
- Tighter margins and spacing
- Simplified tooltip: "Declare tools called via subprocess in code steps.
Tool steps are automatically included when saved."
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Dependencies group box with dropdown to select installed tools
- Dropdown is editable for typing tool references (e.g., official/summarize)
- Add/Remove buttons to manage dependency list
- Dependencies are loaded when editing existing tools
- Dependencies are saved with the tool
This allows users to declare dependencies for tools that call other tools
via subprocess in code steps, making them visible to the dependency system.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Features:
- Local collection definitions stored in ~/.cmdforge/collections/
- CLI commands: create, show, add, remove, delete, publish, status
- GUI Collections page with local and registry tabs
- Collection publishing with tool resolution and visibility checks
- New API endpoints: GET /api/v1/me, GET /api/v1/tools/.../approved,
POST /api/v1/collections
- RegistryClient methods: get_me(), has_approved_public_tool(),
publish_collection()
Implementation:
- collection.py: Collection dataclass, resolve_tool_references(),
classify_tool_reference(), ToolResolutionResult
- collections_page.py: GUI with background workers for install/publish
- collections_commands.py: Full CLI command implementations
- registry/app.py: New authenticated endpoints with validation
Tests:
- test_collection.py: 27 unit tests for collection module
- test_collection_api.py: 20 tests (8 client, 12 API with Flask skip)
Documentation updated: README, CHANGELOG, CLAUDE.md, tests/README
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create ProviderInstallDialog for installing AI provider CLI tools
- Shows available providers (Claude, Codex, Gemini, OpenCode, Ollama)
- Detects which providers are already installed
- Runs installation commands with live output
- Offers to add provider variants after installation
- Add "Tools" menu with "Install AI Provider..." option
- Add "Install Provider..." button to Providers page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tooltips now only appear when hovering over the title text:
- "Input Variables"
- "Assertions (Optional)"
- "Output"
Rather than triggering anywhere in the group box area.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Input Variables: explains {variable} syntax and variable sources
- Assertions: lists all available assertion types with descriptions
- Provider: explains override options including mock provider
- Run Step: describes what happens when clicked
- Output: explains status, output text, variables, and assertion results
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Row height: 50px
- Widget minimum heights: 34px
- Button max height constrained to 34px
- Table max height increased to 220px for taller rows
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove fixed heights, let Qt size widgets to fit cells
- Increase row height to 40px for more room
- Use padding instead of fixed size on remove button
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Set consistent fixed height (26px) on all row widgets
- Replace × with ✕ and style as red delete button
- Add hover/pressed states and tooltip
- Reduce row height to 32px for tighter alignment
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Set fixed column widths (Type: 130px, Remove: 40px)
- Add minimum width (120px) on type combo box
- Value column stretches to fill remaining space
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Set explicit row height (36px) and minimum input height (28px)
to prevent value input from being cut off.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- New TestStepDialog for testing individual steps from the GUI
- Test button in Tool Builder to test selected step
- Auto-detects variables from step templates
- Multiple assertion types: not_empty, contains, valid_json,
matches_regex, min/max_length, equals, valid_python
- Background execution with timing metrics
- Provider override option for testing with mock provider
- Output variable display and assertion pass/fail results
Completes M5: Testing & Polish milestone (100%)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add DARK_THEME stylesheet alongside existing LIGHT_THEME
- Add load_theme() function to load themes by name
- Support custom themes via ~/.cmdforge/theme.qss
- Add View menu with Theme submenu for switching themes
- Persist theme choice in QSettings across sessions
- Update META_TOOLS.md to reflect implemented dependency commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Help menu with quick guides: Getting Started, Create Tool,
Install Tools, Publish Tools, Keyboard Shortcuts, About
- F1 shortcut opens Getting Started guide
- Add tooltips to Tool Builder section headings (Arguments, Steps,
Output Template) that appear on hover over the label text
- Add tooltips to Registry page controls (search, filters, pagination)
- Enhance sidebar tooltips with keyboard shortcuts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add validate_token() method to RegistryClient
- Returns (is_valid, error_message) tuple
- Catches 401/UNAUTHORIZED errors and connection issues
- Add startup validation in MainWindow
- Runs 500ms after window shows (non-blocking)
- Clears invalid tokens automatically
- Shows status bar message explaining what happened
- Document cmdforge config disconnect command
This prevents confusing errors when trying to publish with stale or
revoked credentials - the GUI now auto-clears bad connections on restart.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Registry Features:
- Fork tracking with forked_from/forked_version metadata
- Forked tools show "Forked from" notice on detail page
- Original tools display "Forks" section listing all forks
- Fork count in tool stats
- API: GET /api/v1/tools/<owner>/<name>/forks
GUI Improvements:
- Version selector dropdown for registry installs
- Fetch available versions via GET /api/v1/tools/<owner>/<name>/versions
- "Latest" option plus all available versions listed
Admin Features:
- POST /api/v1/admin/cleanup/rejected endpoint
- Maintenance section in admin dashboard
- "Dry Run" and "Run Cleanup" buttons for rejected version cleanup
- Configurable grace period (default 7 days)
Documentation:
- Updated CHANGELOG.md with all recent changes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Make publish endpoint idempotent: return success if same content
already exists instead of VERSION_EXISTS error (fixes retry issues)
- Always refresh tools page after publish dialog closes
- Consolidate My Tools page to group versions by tool name
- Show version count and list instead of separate rows per version
- Sum downloads across all versions for accurate totals
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Show local and registry version in publish dialog
- Add +Patch/+Minor/+Major bump buttons
- Auto-fetch registry version on dialog open
- Suggest next version based on latest registry version
- Add fork detection and forked_from metadata support
- Update registry schema for forked_from/forked_version fields
- Display fork indicator when publishing forked tools
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The visible button was confusing since auto-polling handles status
updates. Power users can press F5 to manually sync if needed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Simplified approach: just show the moderation status from the server
without trying to detect local modifications. This eliminates the
fragile hash comparison that kept breaking due to representation
differences between to_dict(), raw YAML, and server-side normalization.
States are now simply: local, pending, published, changes_requested, rejected
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The GUI was sending to_dict() output to server but only updating the
existing config file with the hash. This caused mismatches because
to_dict() adds fields like 'arguments: []' that weren't in the original.
Now saves the exact config that was published, ensuring local file
matches what was sent to server.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use raw config for hash comparison instead of to_dict(), which was
adding fields like 'arguments: []' that weren't in the original config.
This caused tools to show as "modified" when they weren't.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add QTimer polling every 30s when tools are pending/changes_requested
- Display changes_requested (⚠) and rejected (✗) states in tool tree
- Show moderator feedback in tool info panel
- Add `cmdforge registry status <tool>` CLI command with --sync flag
- Update _sync_tool to persist registry_feedback field
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When the Tools page loads, automatically sync statuses for all published
tools in the background. This means users don't need to manually click
"Sync Status" - the indicators will update automatically.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The publish dialog adds version and tags fields that aren't stored in
the local config.yaml. Exclude these from hash computation so the
hash comparison works correctly.
Also use Tool.to_dict() for consistent hash computation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Track moderation status (pending/approved/rejected) in local tool config
- Add new "pending" state indicator (◐ yellow) distinct from "published" (✓ green)
- Add "Sync Status" button to check registry for updated moderation status
- Add /me/tools/<name>/status API endpoint for checking tool status
- Improve admin panel error handling with better error messages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The tool list now refreshes after publishing to immediately show
the updated publish state indicator (✓).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add config_hash to publish API response
- Save registry_hash to local tool config after successful publish
- Show appropriate message based on moderation status (approved vs pending)
This enables the GUI to show publish state indicators (✓ published, ● modified)
for tools that have been published to the registry.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The publish_tool() API expects a YAML config string, but the dialog
was passing a dict directly, causing a 500 error on the server.
- Update PublishWorker to accept config_yaml string and readme
- Build complete tool config from Tool.to_dict()
- Convert to YAML string before sending
- Also include README.md if it exists in tool directory
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The _update_buttons method wasn't handling the no-token case properly.
When not connected, the Connect button should always be enabled.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add `cmdforge config disconnect` command to clear registry token
- Fix GUI connection status label not updating after connect
- Store status as instance variable instead of local
- Add _update_connection_status() method
- Call update after connect dialog completes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add hash_utils.py module for SHA256 content hashing with normalized YAML
- Store config_hash in registry database on publish
- Include hash in download response for client verification
- Verify downloaded content matches registry hash on install
- Store registry_hash in local tool config for publish state tracking
- Show publish state indicators in Tools page UI:
- Green checkmark: Published and up to date
- Orange dot: Modified since last publish
- No indicator: Local tool (never published)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add icons module with programmatically drawn icons:
- Speech bubble for prompt steps
- Code brackets </> for code steps
- Arrow icons for input/output nodes
- Display icons in list view next to step names
- Display icons in flow view node headers
- Add inline name editing in flow view via property_changed signal
- Sync name changes from flow view to tool model and list view
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added "Cut links: Alt+Shift+drag" to help banner.
Shortened other labels to fit.
In NodeGraphQt, connections are cut by:
- Alt+Shift+Left-drag to slice through connections
- Dragging a connection endpoint to empty space
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add _rebuilding flag to ignore signals during rebuild
- Prevents cascade of port_disconnected signals when clearing graph
- Fixes KeyError in NodeGraphQt undo stack
- Fixes false dependency warnings on view switch
The port_disconnected and nodes_deleted signals were firing during
clear_session(), causing recursive rebuilds and errors.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When a connection is broken in the flow view:
1. The node that lost its input moves to the end of the chain
2. The remaining nodes reconnect automatically
3. Tool model updates to reflect new order
4. Dependency validation warns about broken references
Flow: Input → A → B → C → Output
Break B's input: Input → A → C → B → Output
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Only parse {variable} patterns in PromptSteps, not CodeSteps.
In CodeSteps, variables are available directly as Python variables
(e.g., use `input` not `{input}`). The {var} syntax in code is
typically Python f-string or .format() syntax, not CmdForge
template substitution.
This fixes false positives like artifact-ai where Python f-strings
like f"{format_guide}" were incorrectly flagged as missing CmdForge
variable references.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
List View:
- Enable drag-drop reordering of steps
- Show broken dependency warnings when reordering
- Steps with missing variable refs shown in red with tooltip
Validation:
- Parse {variable} references from prompts and code
- Track available variables at each step position
- Warn when steps reference undefined variables
Flow View Sync:
- Deleting nodes in flow view updates the tool model
- steps_deleted signal propagates changes to builder
- Both views stay in sync
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- F key now fits to selected nodes (or all if none selected)
- A key selects all nodes
- Workflow: drag-select nodes then F to zoom, or A then F for all
- Updated help banner and context menu
- Context menu now has Select All (A) and Fit Selection (F)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>