-
Notifications
You must be signed in to change notification settings - Fork 155
Add VPS deployment monitoring scripts and documentation #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
developerisnow
wants to merge
172
commits into
moazbuilds:main
Choose a base branch
from
developerisnow:feat/vps-monitoring-scripts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add VPS deployment monitoring scripts and documentation #26
developerisnow
wants to merge
172
commits into
moazbuilds:main
from
developerisnow:feat/vps-monitoring-scripts
Conversation
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
updating definition
…d executions The profile parameter was redundant as the agentId is sufficient for authentication purposes. This simplifies the API surface and reduces unnecessary configuration options across all engine providers (Claude, Cursor, Codex) and their execution flows. Fixing json codex starting bug "can't find 'git-commit' profile"
…chitecture output paths - Split tracking functions into template.ts and steps.ts for better organization - Add new functions for tracking not completed steps - Update all references from .codemachine/plan/ to .codemachine/artifacts/ - Add new output format templates for architecture and plan generation - Implement glob pattern support in placeholder resolution
implement fallback agent execution when a step is marked as incomplete add notCompletedFallback field to workflow step types introduce fallback execution logic before original step runs
- Add plan-fallback and task-fallback agents to handle incomplete executions - Increase default timeout from 10 to 30 minutes across all providers - Refactor prompt placeholder processing into modular components - Implement structured task output with manifest files - Add support for optional placeholders with fallback behavior
Update placeholder configuration and template files to use consistent naming for task fallback files and variables. This ensures proper file resolution and variable interpolation in the task breakdown process.
Add markdown templates for codemachine workflows, agents, output formats, and fallback agents. These templates define the structure and behavior for various components in the codemachine system including task verification, git commit workflows, and agent-specific instructions. The templates provide consistent formatting and guidelines for: - Workflow definitions - Agent roles and responsibilities - Output format specifications - Fallback agent behavior
…uration - Standardize agent prompt file naming and paths - Add context manager agent to workflow - Update task verification workflow with detailed signaling - Consolidate output format placeholders - Adjust workflow loop steps for new context manager
refactor(validation): update task verification to use behavior.json docs: update agent prompts to use context and code_fallback placeholders build: add new placeholder paths for context and code_fallback files
…tructions - Clarify the issues detected section with more specific error details - Improve fix instructions with concrete action steps - Update success workflow to use task list file instead of direct JSON output
Enable resuming long workflows by starting from the last incomplete step tracked in .codemachine/template.json when resumeFromLastStep is true. Add getResumeStartIndex to compute the starting index based on notCompletedSteps. Update workflow runner to begin iteration from the computed index and log a resume notice. Expose the helper via shared workflows index. This improves reliability after interruptions without breaking existing behavior (feature disabled by default).
…ete step - Change resume behavior to use first incomplete step instead of last - Add default values for tracking fields in template and step functions - Add reasoning level validation and spinner logging to step command
- Bump package version to 0.3.0 - Replace 'plan' directory with 'artifacts' in workspace initialization - Add promptPath validation for fallback agents - Improve tool call handling in cursor engine runner - Update workflow templates to use cursor engine by default - Refactor loop behavior to use behavior.json instead of triggers - Update README with new installation instructions and features
- Convert synchronous loop handling functions to async/await pattern - Add detailed error logging for template tracking operations - Improve file path handling with path.join() for cross-platform compatibility - Enhance documentation for timestamp format in tracking interfaces - Update tests to handle async loop evaluation
- Add update-notifier package to check for updates daily - Include dim color in chalk palette for CLI styling - Update version from 0.1.0 to 0.3.0 - Enhance error messages with resume workflow instructions
- Add comprehensive CONTRIBUTING.md with contribution guidelines and workflow documentation
…ings - Rename architecture agent to standard naming convention - Streamline workflow engine configurations by removing redundant model specifications
Update README with improved formatting, updated statistics, and added comparison table Remove docs directory from gitignore as documentation is now tracked
Update documentation templates to reflect the new plan artifacts directory path from `.codemachine/artifacts/` to `.codemachine/artifacts/plan/` for consistency
…oopTrigger remove outdated engine authentication by removing profile-specific configuration Remove deprecated loopTrigger from module metadata and workflow configs
- Simplify start command to run workflow queue directly in headless mode
- improve DIM and update npm notifier - make CLI path in main menu dynamic
…tion - Introduce trigger behavior type and evaluation logic - Implement trigger controller and execution handling - Add iteration-checker module with trigger capability - Support dynamic agent triggering during workflow execution
The previous type assertion was incorrect and could cause runtime errors. Using NodeJS.EventEmitter ensures proper type safety when emitting events.
Add more specific patterns to exclude from version control including cache files, logs and temporary files
Update workflow steps to use 'cursor' engine with 'grok' model for plan-agent, task-breakdown, code-generation, runtime-prep, task-sanity-check, and git-commit steps. Change context-manager to use 'ccr' engine. Remove engine and fallback from plan-agent.
…ption Proper-lockfile requires the target file to exist. Added file creation logic and changed error handling to throw instead of degrade silently to prevent data corruption from concurrent access.
Replace async file operations with sync ones during registry file creation to ensure atomicity Add validation for empty/invalid registry files to handle edge cases
Switch engine assignments for various steps to improve consistency and reliability
- Add loopReason field to display task progress (e.g., "Cycle 2 - Task 5/50") - Update task verification workflow to report progress as "Task X/Y" - Pass loop reason from workflow execution to UI state - Fix bug where loopReason was cleared during agent reset
…d rules Expand the anchor insertion documentation with specific formatting requirements, placement rules, and workflow instructions. Add verification steps and example to ensure compliance.
- Increment index before accessing next argument in publish script for clarity - Replace tseslint.config with defineConfig for better type safety in eslint config
Integrate OpenCode CLI as a native engine provider alongside Claude, Codex, Cursor, and CCR. This enables users to run `codemachine opencode run` and use `--engine opencode` in workflow steps. Key features: - JSON event streaming with consistent log markers - Non-interactive execution via environment guardrails (OPENCODE_PERMISSION, OPENCODE_DISABLE_LSP_DOWNLOAD) - Registry-based provider pattern matching existing engines - Comprehensive documentation updates across README, CLI reference, and workflow guides 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Refactor auth system to use XDG-compliant paths under OPENCODE_HOME - Add support for multiple authentication providers in OpenCode CLI - Improve user guidance during auth flow with interactive prompts - Centralize all OpenCode data under ~/.codemachine/opencode - Update README to credit contributor for OpenCode integration
Add process group killing for Unix systems to handle Node.js wrapper scripts Improve logging and error handling for process termination Handle race conditions between abort signals and process events
feat: add OpenCode CLI as first-class engine integration
Move telemetry parsing logic into dedicated provider modules for better maintainability Improve telemetry capture by handling provider-specific formats consistently
Ensure environment variables from process.env are included when resolving runner environment to prevent missing variables
Update CCR engine name to 'Claude Code Router' and Claude engine name to 'Claude Code' to better reflect their purpose and functionality
Remove special logout handling for CCR in CLI command Replace .credentials.json with simple .enable marker file Update related auth functions to reflect new simpler approach
- Replace 'any' with 'unknown' and add proper type guards - Update eslint config to use tseslint.config - Rename CCR engine display name to 'Claude Code Router'
Add deployment utilities for running CodeMachine on remote servers: Scripts: - codemachine-persistent.sh: Launch with SSH disconnect survival (nohup) - codemachine-status.sh: Enhanced monitoring (agents, logs, errors) - codemachine-stop.sh: Graceful shutdown with cleanup Documentation: - docs/vps-deployment.md: Complete VPS deployment guide - scripts/deployment/README.md: Script usage and troubleshooting - README.md: Quick start section for remote servers Addresses common issues: - Process termination on SSH disconnect - UI detachment after reconnect (Ink framework limitation) - Monitoring headless workflows Closes moazbuilds#25
Owner
|
Thanks for adding the VPS deployment scripts, We’re planning to move to Bun runtime and do some major adjustments, and once that transition is complete, we can revisit this PR as a strong foundation for long-running VPS deployments. |
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.
Problem
Strongly recommended start from reading issues #25
When running CodeMachine on remote servers (VPS, SSH), users encounter two issues:
These issues make long-running workflows on remote servers problematic.
Solution
This PR adds pragmatic deployment utilities with clear observability:
📦 What's Included
Monitoring Scripts (
scripts/deployment/):codemachine-persistent.sh- Launch with SSH disconnect survival (nohup)codemachine-status.sh- Enhanced monitoring showing:codemachine-stop.sh- Graceful shutdownDocumentation:
docs/vps-deployment.md- Complete deployment guidescripts/deployment/README.md- Script usage and troubleshootingREADME.md- Quick start section✅ Key Features
🎯 Value Proposition
Before:
After:
./scripts/deployment/codemachine-status.sh📊 Testing
Tested on Ubuntu 20.04 VPS:
🔗 Related
Closes #25
📝 Technical Notes
Why UI detaches:
Our approach:
🚀 Usage Example
Output:
Impact: Makes CodeMachine viable for VPS/remote deployment with clear observability.
Approach: Pragmatic - provide tools and documentation, not architectural changes.