juno-code 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,170 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # clean_logs_folder.sh
4
+ #
5
+ # Purpose: Archive log files older than 3 days from .juno_task/logs/*.logs to .juno_task/logs/archive.zip
6
+ #
7
+ # This script:
8
+ # 1. Finds all .logs files in .juno_task/logs/ that are 3 days or older
9
+ # 2. Adds them to .juno_task/logs/archive.zip (creates or appends)
10
+ # 3. Removes the archived log files to free up space
11
+ #
12
+ # Usage: ./clean_logs_folder.sh
13
+ #
14
+ # Created by: juno-task-ts init command
15
+ # Date: Auto-generated during project initialization
16
+
17
+ set -euo pipefail # Exit on error, undefined variable, or pipe failure
18
+
19
+ # Color output for better readability
20
+ RED='\033[0;31m'
21
+ GREEN='\033[0;32m'
22
+ YELLOW='\033[1;33m'
23
+ BLUE='\033[0;34m'
24
+ NC='\033[0m' # No Color
25
+
26
+ # Script configuration
27
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
28
+ JUNO_TASK_DIR="$(dirname "$SCRIPT_DIR")"
29
+ LOGS_DIR="${JUNO_TASK_DIR}/logs"
30
+ ARCHIVE_FILE="${LOGS_DIR}/archive.zip"
31
+ LOG_PATTERN="*.logs"
32
+ DAYS_OLD=3
33
+
34
+ # Logging function
35
+ log_info() {
36
+ echo -e "${BLUE}[INFO]${NC} $1"
37
+ }
38
+
39
+ log_success() {
40
+ echo -e "${GREEN}[SUCCESS]${NC} $1"
41
+ }
42
+
43
+ log_warning() {
44
+ echo -e "${YELLOW}[WARNING]${NC} $1"
45
+ }
46
+
47
+ log_error() {
48
+ echo -e "${RED}[ERROR]${NC} $1"
49
+ }
50
+
51
+ # Check if logs directory exists
52
+ if [ ! -d "$LOGS_DIR" ]; then
53
+ log_warning "Logs directory not found: $LOGS_DIR"
54
+ log_info "Creating logs directory..."
55
+ mkdir -p "$LOGS_DIR"
56
+ log_success "Logs directory created"
57
+ exit 0
58
+ fi
59
+
60
+ # Check if zip command is available
61
+ if ! command -v zip &> /dev/null; then
62
+ log_error "zip command not found. Please install zip utility."
63
+ log_info " macOS: zip is pre-installed"
64
+ log_info " Ubuntu/Debian: sudo apt-get install zip"
65
+ log_info " RHEL/CentOS: sudo yum install zip"
66
+ exit 1
67
+ fi
68
+
69
+ # Find log files older than specified days
70
+ log_info "Searching for log files older than ${DAYS_OLD} days in: $LOGS_DIR"
71
+
72
+ # Use find command to locate old log files
73
+ # -type f: only files
74
+ # -name: match pattern
75
+ # -mtime +N: modified more than N days ago
76
+ OLD_LOGS=$(find "$LOGS_DIR" -maxdepth 1 -type f -name "$LOG_PATTERN" -mtime +${DAYS_OLD} 2>/dev/null || true)
77
+
78
+ # Count the number of files found
79
+ FILE_COUNT=$(echo "$OLD_LOGS" | grep -c . || echo "0")
80
+
81
+ if [ "$FILE_COUNT" -eq 0 ]; then
82
+ log_info "No log files older than ${DAYS_OLD} days found. Nothing to archive."
83
+ exit 0
84
+ fi
85
+
86
+ log_info "Found ${FILE_COUNT} log file(s) to archive"
87
+
88
+ # Create a temporary list file for files to archive
89
+ TEMP_LIST=$(mktemp)
90
+ trap 'rm -f "$TEMP_LIST"' EXIT # Clean up temp file on exit
91
+
92
+ echo "$OLD_LOGS" > "$TEMP_LIST"
93
+
94
+ # Archive the old log files
95
+ log_info "Archiving log files to: $ARCHIVE_FILE"
96
+
97
+ # Change to logs directory to avoid storing full paths in zip
98
+ cd "$LOGS_DIR"
99
+
100
+ # Initialize counters
101
+ ARCHIVED_COUNT=0
102
+ FAILED_COUNT=0
103
+
104
+ # Process each file
105
+ while IFS= read -r log_file; do
106
+ if [ -z "$log_file" ]; then
107
+ continue
108
+ fi
109
+
110
+ # Get just the filename (remove directory path)
111
+ filename=$(basename "$log_file")
112
+
113
+ # Check if file still exists (safety check)
114
+ if [ ! -f "$filename" ]; then
115
+ log_warning "File not found: $filename (skipping)"
116
+ continue
117
+ fi
118
+
119
+ # Add file to archive (update if exists, create if doesn't)
120
+ # -u: update existing archive or create new
121
+ # -q: quiet mode
122
+ # -9: maximum compression
123
+ if zip -u -q -9 "archive.zip" "$filename" 2>/dev/null; then
124
+ # Verify file was added to archive before deleting
125
+ if unzip -t "archive.zip" "$filename" &>/dev/null; then
126
+ # File successfully archived, now remove it
127
+ rm -f "$filename"
128
+ ARCHIVED_COUNT=$((ARCHIVED_COUNT + 1))
129
+ log_success "Archived and removed: $filename"
130
+ else
131
+ log_error "Verification failed for: $filename (file NOT removed)"
132
+ FAILED_COUNT=$((FAILED_COUNT + 1))
133
+ fi
134
+ else
135
+ log_error "Failed to archive: $filename"
136
+ FAILED_COUNT=$((FAILED_COUNT + 1))
137
+ fi
138
+ done < "$TEMP_LIST"
139
+
140
+ # Return to original directory
141
+ cd - > /dev/null
142
+
143
+ # Print summary
144
+ echo ""
145
+ log_info "=== Archive Summary ==="
146
+ log_success "Successfully archived: ${ARCHIVED_COUNT} file(s)"
147
+
148
+ if [ "$FAILED_COUNT" -gt 0 ]; then
149
+ log_warning "Failed to archive: ${FAILED_COUNT} file(s)"
150
+ fi
151
+
152
+ if [ -f "$ARCHIVE_FILE" ]; then
153
+ ARCHIVE_SIZE=$(du -h "$ARCHIVE_FILE" | cut -f1)
154
+ log_info "Archive location: $ARCHIVE_FILE"
155
+ log_info "Archive size: $ARCHIVE_SIZE"
156
+
157
+ # Show archive contents count
158
+ TOTAL_ARCHIVED=$(unzip -l "$ARCHIVE_FILE" 2>/dev/null | tail -1 | awk '{print $2}')
159
+ log_info "Total files in archive: ${TOTAL_ARCHIVED}"
160
+ fi
161
+
162
+ echo ""
163
+ log_success "Log cleanup completed!"
164
+
165
+ # Exit with appropriate code
166
+ if [ "$FAILED_COUNT" -gt 0 ]; then
167
+ exit 2 # Partial success
168
+ else
169
+ exit 0 # Complete success
170
+ fi
@@ -0,0 +1,221 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # install_requirements.sh
4
+ #
5
+ # Purpose: Install Python dependencies required for juno-task-ts
6
+ #
7
+ # This script:
8
+ # 1. Checks if 'uv' (ultrafast Python package manager) is installed
9
+ # 2. Falls back to 'pip' if 'uv' is not available
10
+ # 3. Installs required packages: juno-kanban, roundtable-ai
11
+ # 4. Reports if requirements are already satisfied
12
+ # 5. Shows error if neither 'uv' nor 'pip' is available
13
+ #
14
+ # Usage: ./install_requirements.sh
15
+ #
16
+ # Created by: juno-task-ts init command
17
+ # Date: Auto-generated during project initialization
18
+
19
+ set -euo pipefail # Exit on error, undefined variable, or pipe failure
20
+
21
+ # Color output for better readability
22
+ RED='\033[0;31m'
23
+ GREEN='\033[0;32m'
24
+ YELLOW='\033[1;33m'
25
+ BLUE='\033[0;34m'
26
+ NC='\033[0m' # No Color
27
+
28
+ # Required packages
29
+ REQUIRED_PACKAGES=("juno-kanban" "roundtable-ai")
30
+
31
+ # Logging functions
32
+ log_info() {
33
+ echo -e "${BLUE}[INFO]${NC} $1"
34
+ }
35
+
36
+ log_success() {
37
+ echo -e "${GREEN}[SUCCESS]${NC} $1"
38
+ }
39
+
40
+ log_warning() {
41
+ echo -e "${YELLOW}[WARNING]${NC} $1"
42
+ }
43
+
44
+ log_error() {
45
+ echo -e "${RED}[ERROR]${NC} $1"
46
+ }
47
+
48
+ # Function to check if a Python package is installed
49
+ check_package_installed() {
50
+ local package_name="$1"
51
+
52
+ # Try using python -m pip show (most reliable)
53
+ if python3 -m pip show "$package_name" &>/dev/null || python -m pip show "$package_name" &>/dev/null; then
54
+ return 0 # Package is installed
55
+ fi
56
+
57
+ return 1 # Package not installed
58
+ }
59
+
60
+ # Function to check if all requirements are satisfied
61
+ check_all_requirements_satisfied() {
62
+ local all_satisfied=true
63
+
64
+ for package in "${REQUIRED_PACKAGES[@]}"; do
65
+ if ! check_package_installed "$package"; then
66
+ all_satisfied=false
67
+ break
68
+ fi
69
+ done
70
+
71
+ if [ "$all_satisfied" = true ]; then
72
+ return 0 # All requirements satisfied
73
+ else
74
+ return 1 # Some requirements missing
75
+ fi
76
+ }
77
+
78
+ # Function to install packages using uv
79
+ install_with_uv() {
80
+ log_info "Installing packages using 'uv' (ultrafast Python package manager)..."
81
+
82
+ local failed_packages=()
83
+
84
+ for package in "${REQUIRED_PACKAGES[@]}"; do
85
+ log_info "Installing: $package"
86
+ if uv pip install "$package" --quiet; then
87
+ log_success "Successfully installed: $package"
88
+ else
89
+ log_error "Failed to install: $package"
90
+ failed_packages+=("$package")
91
+ fi
92
+ done
93
+
94
+ if [ ${#failed_packages[@]} -gt 0 ]; then
95
+ log_error "Failed to install ${#failed_packages[@]} package(s): ${failed_packages[*]}"
96
+ return 1
97
+ fi
98
+
99
+ return 0
100
+ }
101
+
102
+ # Function to install packages using pip
103
+ install_with_pip() {
104
+ log_info "Installing packages using 'pip'..."
105
+
106
+ # Detect python command (python3 or python)
107
+ local python_cmd="python3"
108
+ if ! command -v python3 &> /dev/null; then
109
+ if command -v python &> /dev/null; then
110
+ python_cmd="python"
111
+ else
112
+ log_error "Python not found. Please install Python 3."
113
+ return 1
114
+ fi
115
+ fi
116
+
117
+ local failed_packages=()
118
+
119
+ for package in "${REQUIRED_PACKAGES[@]}"; do
120
+ log_info "Installing: $package"
121
+ if $python_cmd -m pip install "$package" --quiet; then
122
+ log_success "Successfully installed: $package"
123
+ else
124
+ log_error "Failed to install: $package"
125
+ failed_packages+=("$package")
126
+ fi
127
+ done
128
+
129
+ if [ ${#failed_packages[@]} -gt 0 ]; then
130
+ log_error "Failed to install ${#failed_packages[@]} package(s): ${failed_packages[*]}"
131
+ return 1
132
+ fi
133
+
134
+ return 0
135
+ }
136
+
137
+ # Main installation logic
138
+ main() {
139
+ echo ""
140
+ log_info "=== Python Requirements Installation ==="
141
+ echo ""
142
+
143
+ # Step 1: Check if all requirements are already satisfied
144
+ log_info "Checking if requirements are already satisfied..."
145
+
146
+ if check_all_requirements_satisfied; then
147
+ log_success "All requirements already satisfied!"
148
+ echo ""
149
+ log_info "Installed packages:"
150
+ for package in "${REQUIRED_PACKAGES[@]}"; do
151
+ echo " ✓ $package"
152
+ done
153
+ echo ""
154
+ exit 0
155
+ fi
156
+
157
+ log_info "Some packages need to be installed."
158
+ echo ""
159
+
160
+ # Step 2: Determine which package manager to use
161
+ local installer=""
162
+
163
+ if command -v uv &> /dev/null; then
164
+ log_success "'uv' found - using ultrafast Python package manager"
165
+ installer="uv"
166
+ elif command -v pip3 &> /dev/null || command -v pip &> /dev/null; then
167
+ log_success "'pip' found - using standard Python package installer"
168
+ installer="pip"
169
+ else
170
+ # Neither uv nor pip found
171
+ log_error "Neither 'uv' nor 'pip' package manager found!"
172
+ echo ""
173
+ log_info "Please install one of the following:"
174
+ echo ""
175
+ echo " Option 1: Install 'uv' (recommended - ultrafast)"
176
+ echo " curl -LsSf https://astral.sh/uv/install.sh | sh"
177
+ echo " OR"
178
+ echo " brew install uv (macOS)"
179
+ echo ""
180
+ echo " Option 2: Install 'pip' (standard Python package manager)"
181
+ echo " python3 -m ensurepip --upgrade"
182
+ echo " OR"
183
+ echo " curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py"
184
+ echo ""
185
+ exit 1
186
+ fi
187
+
188
+ # Step 3: Install packages
189
+ echo ""
190
+ log_info "Installing required packages: ${REQUIRED_PACKAGES[*]}"
191
+ echo ""
192
+
193
+ if [ "$installer" = "uv" ]; then
194
+ if install_with_uv; then
195
+ echo ""
196
+ log_success "All packages installed successfully using 'uv'!"
197
+ echo ""
198
+ exit 0
199
+ else
200
+ log_error "Some packages failed to install with 'uv'"
201
+ exit 1
202
+ fi
203
+ elif [ "$installer" = "pip" ]; then
204
+ if install_with_pip; then
205
+ echo ""
206
+ log_success "All packages installed successfully using 'pip'!"
207
+ echo ""
208
+ exit 0
209
+ else
210
+ log_error "Some packages failed to install with 'pip'"
211
+ exit 1
212
+ fi
213
+ fi
214
+
215
+ # Should not reach here
216
+ log_error "Unexpected error during installation"
217
+ exit 1
218
+ }
219
+
220
+ # Run main function
221
+ main "$@"
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "juno-code",
3
+ "version": "1.0.1",
4
+ "description": "AI Subagent Orchestration CLI - Code-focused package for juno-task-ts providing Claude Code integration and MCP server orchestration",
5
+ "keywords": [
6
+ "ai",
7
+ "code",
8
+ "cli",
9
+ "typescript",
10
+ "mcp",
11
+ "subagents",
12
+ "automation",
13
+ "claude",
14
+ "cursor",
15
+ "codex",
16
+ "gemini",
17
+ "orchestration",
18
+ "coding"
19
+ ],
20
+ "main": "dist/index.js",
21
+ "module": "dist/index.mjs",
22
+ "types": "dist/index.d.ts",
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/index.d.ts",
26
+ "import": "./dist/index.mjs",
27
+ "require": "./dist/index.js"
28
+ }
29
+ },
30
+ "bin": {
31
+ "juno": "./dist/bin/cli.mjs",
32
+ "juno-agent": "./dist/bin/cli.mjs",
33
+ "juno-code": "./dist/bin/cli.mjs",
34
+ "juno-ts-task": "./dist/bin/cli.mjs",
35
+ "juno-collect-feedback": "./dist/bin/feedback-collector.mjs"
36
+ },
37
+ "files": [
38
+ "dist",
39
+ "README.md",
40
+ "CHANGELOG.md"
41
+ ],
42
+ "dependencies": {
43
+ "@modelcontextprotocol/sdk": "^1.20.0",
44
+ "chalk": "^5.3.0",
45
+ "cli-table3": "^0.6.5",
46
+ "commander": "^11.1.0",
47
+ "execa": "^8.0.1",
48
+ "fast-glob": "^3.3.2",
49
+ "file-type": "^18.7.0",
50
+ "fs-extra": "^11.1.1",
51
+ "fuse.js": "^6.6.2",
52
+ "glob": "^10.4.5",
53
+ "handlebars": "^4.7.8",
54
+ "ink": "^4.4.1",
55
+ "js-yaml": "^4.1.0",
56
+ "react": "^18.2.0",
57
+ "semver": "^7.5.4",
58
+ "supports-color": "^9.4.0",
59
+ "uuid": "^9.0.1",
60
+ "which": "^4.0.0",
61
+ "zod": "^3.22.4"
62
+ },
63
+ "engines": {
64
+ "node": ">=18.0.0"
65
+ },
66
+ "repository": {
67
+ "type": "git",
68
+ "url": "https://github.com/owner/juno-task-ts.git"
69
+ },
70
+ "bugs": {
71
+ "url": "https://github.com/owner/juno-task-ts/issues"
72
+ },
73
+ "homepage": "https://github.com/owner/juno-task-ts#readme",
74
+ "license": "MIT",
75
+ "author": {
76
+ "name": "Development Team",
77
+ "email": "dev@example.com"
78
+ },
79
+ "publishConfig": {
80
+ "access": "public"
81
+ }
82
+ }