juno-code 1.0.10 → 1.0.13
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.
- package/README.md +11 -20
- package/dist/bin/cli.js +444 -265
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +444 -265
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/bin/feedback-collector.js.map +1 -1
- package/dist/bin/feedback-collector.mjs.map +1 -1
- package/dist/index.js +62 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +59 -16
- package/dist/index.mjs.map +1 -1
- package/dist/templates/scripts/clean_logs_folder.sh +1 -1
- package/dist/templates/scripts/cleanup_feedback.sh +3 -0
- package/dist/templates/scripts/install_requirements.sh +183 -16
- package/dist/templates/scripts/kanban.sh +19 -0
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -44,7 +44,7 @@ var __export = (target, all) => {
|
|
|
44
44
|
var version;
|
|
45
45
|
var init_version = __esm({
|
|
46
46
|
"src/version.ts"() {
|
|
47
|
-
version = "1.0.
|
|
47
|
+
version = "1.0.13";
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
function isHeadlessEnvironment() {
|
|
@@ -3992,6 +3992,26 @@ init_version();
|
|
|
3992
3992
|
// src/core/config.ts
|
|
3993
3993
|
init_version();
|
|
3994
3994
|
|
|
3995
|
+
// src/templates/default-hooks.ts
|
|
3996
|
+
init_version();
|
|
3997
|
+
var DEFAULT_HOOKS = {
|
|
3998
|
+
START_ITERATION: {
|
|
3999
|
+
commands: [
|
|
4000
|
+
// Monitor CLAUDE.md file size
|
|
4001
|
+
'file="CLAUDE.md"; lines=$(wc -l < "$file" 2>/dev/null || echo 0); chars=$(wc -m < "$file" 2>/dev/null || echo 0); if [ "$lines" -gt 450 ] || [ "$chars" -gt 60000 ]; then juno-kanban "[Critical] file $file is too large, keep it lean and useful for every run of the agent."; fi',
|
|
4002
|
+
// Monitor AGENTS.md file size
|
|
4003
|
+
'file="AGENTS.md"; lines=$(wc -l < "$file" 2>/dev/null || echo 0); chars=$(wc -m < "$file" 2>/dev/null || echo 0); if [ "$lines" -gt 450 ] || [ "$chars" -gt 60000 ]; then juno-kanban "[Critical] file $file is too large, keep it lean and useful for every run of the agent."; fi',
|
|
4004
|
+
"./.juno_task/scripts/cleanup_feedback.sh"
|
|
4005
|
+
]
|
|
4006
|
+
}
|
|
4007
|
+
};
|
|
4008
|
+
function getDefaultHooks() {
|
|
4009
|
+
return JSON.parse(JSON.stringify(DEFAULT_HOOKS));
|
|
4010
|
+
}
|
|
4011
|
+
function getDefaultHooksJson(indent = 2) {
|
|
4012
|
+
return JSON.stringify(DEFAULT_HOOKS, null, indent);
|
|
4013
|
+
}
|
|
4014
|
+
|
|
3995
4015
|
// src/core/profiles.ts
|
|
3996
4016
|
init_version();
|
|
3997
4017
|
var PartialJunoTaskConfigSchema = z.object({
|
|
@@ -4402,6 +4422,28 @@ var CircularInheritanceError = class extends ProfileError {
|
|
|
4402
4422
|
|
|
4403
4423
|
// src/core/config.ts
|
|
4404
4424
|
var ENV_VAR_MAPPING = {
|
|
4425
|
+
// Core settings
|
|
4426
|
+
JUNO_CODE_DEFAULT_SUBAGENT: "defaultSubagent",
|
|
4427
|
+
JUNO_CODE_DEFAULT_MAX_ITERATIONS: "defaultMaxIterations",
|
|
4428
|
+
JUNO_CODE_DEFAULT_MODEL: "defaultModel",
|
|
4429
|
+
// Logging settings
|
|
4430
|
+
JUNO_CODE_LOG_LEVEL: "logLevel",
|
|
4431
|
+
JUNO_CODE_LOG_FILE: "logFile",
|
|
4432
|
+
JUNO_CODE_VERBOSE: "verbose",
|
|
4433
|
+
JUNO_CODE_QUIET: "quiet",
|
|
4434
|
+
// MCP settings
|
|
4435
|
+
JUNO_CODE_MCP_TIMEOUT: "mcpTimeout",
|
|
4436
|
+
JUNO_CODE_MCP_RETRIES: "mcpRetries",
|
|
4437
|
+
JUNO_CODE_MCP_SERVER_PATH: "mcpServerPath",
|
|
4438
|
+
JUNO_CODE_MCP_SERVER_NAME: "mcpServerName",
|
|
4439
|
+
// TUI settings
|
|
4440
|
+
JUNO_CODE_INTERACTIVE: "interactive",
|
|
4441
|
+
JUNO_CODE_HEADLESS_MODE: "headlessMode",
|
|
4442
|
+
// Paths
|
|
4443
|
+
JUNO_CODE_WORKING_DIRECTORY: "workingDirectory",
|
|
4444
|
+
JUNO_CODE_SESSION_DIRECTORY: "sessionDirectory"
|
|
4445
|
+
};
|
|
4446
|
+
var LEGACY_ENV_VAR_MAPPING = {
|
|
4405
4447
|
// Core settings
|
|
4406
4448
|
JUNO_TASK_DEFAULT_SUBAGENT: "defaultSubagent",
|
|
4407
4449
|
JUNO_TASK_DEFAULT_MAX_ITERATIONS: "defaultMaxIterations",
|
|
@@ -4474,16 +4516,16 @@ var DEFAULT_CONFIG = {
|
|
|
4474
4516
|
// Paths
|
|
4475
4517
|
workingDirectory: process.cwd(),
|
|
4476
4518
|
sessionDirectory: path5.join(process.cwd(), ".juno_task"),
|
|
4477
|
-
// Hooks configuration
|
|
4478
|
-
hooks:
|
|
4519
|
+
// Hooks configuration - populated with default hooks template
|
|
4520
|
+
hooks: getDefaultHooks()
|
|
4479
4521
|
};
|
|
4480
4522
|
var GLOBAL_CONFIG_FILE_NAMES = [
|
|
4481
|
-
"juno-
|
|
4482
|
-
"juno-
|
|
4483
|
-
".juno-
|
|
4484
|
-
".juno-
|
|
4523
|
+
"juno-code.config.json",
|
|
4524
|
+
"juno-code.config.js",
|
|
4525
|
+
".juno-coderc.json",
|
|
4526
|
+
".juno-coderc.js",
|
|
4485
4527
|
"package.json"
|
|
4486
|
-
// Will look for '
|
|
4528
|
+
// Will look for 'junoCode' field
|
|
4487
4529
|
];
|
|
4488
4530
|
var PROJECT_CONFIG_FILE = ".juno_task/config.json";
|
|
4489
4531
|
function resolvePath(inputPath, basePath = process.cwd()) {
|
|
@@ -4510,6 +4552,12 @@ function loadConfigFromEnv() {
|
|
|
4510
4552
|
config[configKey] = parseEnvValue(value);
|
|
4511
4553
|
}
|
|
4512
4554
|
}
|
|
4555
|
+
for (const [envVar, configKey] of Object.entries(LEGACY_ENV_VAR_MAPPING)) {
|
|
4556
|
+
const value = process.env[envVar];
|
|
4557
|
+
if (value !== void 0 && config[configKey] === void 0) {
|
|
4558
|
+
config[configKey] = parseEnvValue(value);
|
|
4559
|
+
}
|
|
4560
|
+
}
|
|
4513
4561
|
return config;
|
|
4514
4562
|
}
|
|
4515
4563
|
async function loadJsonConfig(filePath) {
|
|
@@ -4533,7 +4581,7 @@ async function loadPackageJsonConfig(filePath) {
|
|
|
4533
4581
|
try {
|
|
4534
4582
|
const content = await promises.readFile(filePath, "utf-8");
|
|
4535
4583
|
const packageJson = JSON.parse(content);
|
|
4536
|
-
return packageJson.
|
|
4584
|
+
return packageJson.junoCode || {};
|
|
4537
4585
|
} catch (error) {
|
|
4538
4586
|
throw new Error(`Failed to load package.json config from ${filePath}: ${error}`);
|
|
4539
4587
|
}
|
|
@@ -4768,12 +4816,7 @@ async function ensureHooksConfig(baseDir) {
|
|
|
4768
4816
|
const configPath = path5.join(configDir, "config.json");
|
|
4769
4817
|
await fs.ensureDir(configDir);
|
|
4770
4818
|
const configExists = await fs.pathExists(configPath);
|
|
4771
|
-
const allHookTypes =
|
|
4772
|
-
START_RUN: { commands: [] },
|
|
4773
|
-
START_ITERATION: { commands: [] },
|
|
4774
|
-
END_ITERATION: { commands: [] },
|
|
4775
|
-
END_RUN: { commands: [] }
|
|
4776
|
-
};
|
|
4819
|
+
const allHookTypes = getDefaultHooks();
|
|
4777
4820
|
if (!configExists) {
|
|
4778
4821
|
const defaultConfig = {
|
|
4779
4822
|
...DEFAULT_CONFIG,
|
|
@@ -14720,6 +14763,6 @@ function migrateError(error) {
|
|
|
14720
14763
|
return error;
|
|
14721
14764
|
}
|
|
14722
14765
|
|
|
14723
|
-
export { AlertDialog, AlreadyExistsError, BooleanSelect, CLIError, CLIOptionsSchema, ChoiceDialog, CircularInheritanceError, CircularProgress, CommandNotFoundError, ConfigFileNotFoundError, ConfigInvalidSyntaxError, ConfigLoader, ConfigValidationSchema, ConfigurationError, ConfirmDialog, ConnectionEventType, ConstraintValidationError, CustomSpinner, DEFAULT_CATEGORY_SEVERITY, DEFAULT_CATEGORY_STRATEGY, DEFAULT_CONFIG, DEFAULT_ERROR_RECOVERY_CONFIG, DEFAULT_PROGRESS_CONFIG, DEFAULT_RATE_LIMIT_CONFIG, DEFAULT_TUI_THEME, DependencyValidationError, Dialog, DirectoryPathSchema, DiskFullError, ENV_VAR_MAPPING, ERROR_CODE_CATEGORIES, ErrorCategory, ErrorCode, ErrorDialog, ErrorHandlingStrategy, ErrorManager, ErrorPriority, ErrorRecoveryManager, ErrorReporter, ErrorSeverity, ExecutionEngine, ExecutionStatus, ExponentialBackoffStrategy, FileNotFoundError, FilePathSchema, FileProgressBar, FileSessionStorage, FixedBackoffStrategy, GitUrlSchema, IOError, IndeterminateProgressBar, Input, InvalidArgumentsError, InvalidChoiceError, InvalidFormatError, InvalidPathError, IterationsSchema, JunoMCPClient, JunoTaskConfigSchema, JunoTaskError, KEYS, LinearBackoffStrategy, LoadingSpinner, LogLevelSchema2 as LogLevelSchema, MCPAuthError, MCPConfigError, MCPConfigLoader, MCPConnectionState, MCPErrorCode, MCPServerUnresponsiveError, MCPToolNotFoundError, MCPValidationError, MCP_DEFAULTS, MetricsCollector, MetricsReporter, ModelSchema, MultiSelect, OutOfRangeError, PROGRESS_CHARS, PROGRESS_PATTERNS, PerformanceTracker, PermissionDeniedError, ProfileError, ProfileExistsError, ProfileNotFoundError, ProgressBar, ProgressDialog, ProgressEventType, ProgressSpinner, ProgressStreamManager, PromptEditor, QuickSelect, RATE_LIMIT_PATTERNS, RecoveryActionType, RecoveryStrategyType, RequiredFieldError, ResourceBusyError, ResourceExhaustedError, SPINNER_FRAMES, SUBAGENT_ALIASES2 as SUBAGENT_ALIASES, SUBAGENT_TOOL_MAPPING, SchemaValidationError, SearchableSelect, Select, SessionError, SessionExpiredError, SessionIdSchema, SessionManager, SessionNotFoundError, SessionState, SessionStatusSchema, SessionStorageType, SessionUtils, SimplePromptEditor, SingleSelect, Spinner, SpinnerPresets, StatisticsCalculator, StepProgressBar, SubagentCapability, SubagentSchema, SubagentStatus, SystemError, TUIApp, TUIInputError, TUILayout, TUINotAvailableError, TUIRenderer, TUIScreen, TUIScreenManager, TemplateError, TemplateNotFoundError, TemplateSyntaxError, TimedSpinner, ToolExecutionStatus, TypeValidationError, ValidationError, Validators, calculateRetryDelay, createContextFromCode, createDirectoryIfNotExists, createErrorChain, createErrorContext, createErrorCorrelation, createExecutionEngine, createExecutionRequest, createHeadlessProgress, createKeySequence, createMCPClient, createMCPClientFromConfig, createMetricsCollector, createMetricsReporter, createProfileManager, createSessionManager, enhanceForTerminal, enrichErrorContext, errorManager, errorRecoveryManager, errorReporter, executeHook, executeHooks, findMCPServerPath, formatError, formatErrorForLogging, formatErrorForUser, formatValidationError, getArchitecture, getCacheDirectory, getCategoryPriority, getColorSupport, getConfigDirectory, getCpuUsage, getDataDirectory, getEnvVar, getEnvVarWithDefault, getEnvironmentType, getErrorCategory, getErrorCodeCategory, getHomeDirectory, getMCPServerEnvironment, getMemoryUsage, getNodeEnvironment, getPlatform, getProcessInfo, getRecoveryStrategy, getRecoverySuggestions, getShell, getTUICapabilities, getTempDirectory, getTerminalHeight, getTerminalWidth, hasErrorCategory, hasErrorCode, headlessAlert, headlessConfirmation, headlessPromptEditor, headlessSelection, initializeTUIRenderer, isCIEnvironment, isCategoryRetriable, isConnectionError, isConnectionState, isDefined, isDevelopmentMode, isHeadlessEnvironment, isInDocker, isInteractiveTerminal, isJunoTaskError, isKeyboardEvent, isMCPError, isProgressEvent, isRateLimitError, isRetriableErrorCode, isRetryableError, isRunningAsRoot, isSubagentType, isTUIAvailable, isTUIError, isTUISupported, isTimeoutError, isToolError, isValidLogLevel, isValidPath, isValidSessionStatus, isValidSubagent, isValidationError, launchPromptEditor, launchSimplePrompt, loadConfig, migrateError, parseEnvArray, parseEnvBoolean, parseEnvNumber, parseKeyBinding, parseRateLimitResetTime, registerCleanupHandlers, renderAndWait, renderTUI, requiresUserIntervention, safeConsoleOutput, safeTUIExecution, safeTUIRender, sanitizeFilePath, sanitizeGitUrl, sanitizePromptText, sanitizeSessionId, setEnvVar, showAlert, showConfirmation, showSelection, showTUIAlert, supportsColor2 as supportsColor, tuiRenderer, useAppShortcuts, useFormKeys, useFormState, useGlobalShortcuts, useKeyboard, useListState, useNavigationKeys, useProgressAnimation, useTUIContext, useTUIState, useTextEditingKeys, validateCommandOptions, validateConfig, validateEnvironmentVars, validateHooksConfig, validateIterations, validateJson, validateLogLevel, validateMCPServerPath, validateModel, validateNumberRange, validatePaths, validateStringLength, validateSubagent, validateUniqueArray, validateWithFallback, version };
|
|
14766
|
+
export { AlertDialog, AlreadyExistsError, BooleanSelect, CLIError, CLIOptionsSchema, ChoiceDialog, CircularInheritanceError, CircularProgress, CommandNotFoundError, ConfigFileNotFoundError, ConfigInvalidSyntaxError, ConfigLoader, ConfigValidationSchema, ConfigurationError, ConfirmDialog, ConnectionEventType, ConstraintValidationError, CustomSpinner, DEFAULT_CATEGORY_SEVERITY, DEFAULT_CATEGORY_STRATEGY, DEFAULT_CONFIG, DEFAULT_ERROR_RECOVERY_CONFIG, DEFAULT_HOOKS, DEFAULT_PROGRESS_CONFIG, DEFAULT_RATE_LIMIT_CONFIG, DEFAULT_TUI_THEME, DependencyValidationError, Dialog, DirectoryPathSchema, DiskFullError, ENV_VAR_MAPPING, ERROR_CODE_CATEGORIES, ErrorCategory, ErrorCode, ErrorDialog, ErrorHandlingStrategy, ErrorManager, ErrorPriority, ErrorRecoveryManager, ErrorReporter, ErrorSeverity, ExecutionEngine, ExecutionStatus, ExponentialBackoffStrategy, FileNotFoundError, FilePathSchema, FileProgressBar, FileSessionStorage, FixedBackoffStrategy, GitUrlSchema, IOError, IndeterminateProgressBar, Input, InvalidArgumentsError, InvalidChoiceError, InvalidFormatError, InvalidPathError, IterationsSchema, JunoMCPClient, JunoTaskConfigSchema, JunoTaskError, KEYS, LEGACY_ENV_VAR_MAPPING, LinearBackoffStrategy, LoadingSpinner, LogLevelSchema2 as LogLevelSchema, MCPAuthError, MCPConfigError, MCPConfigLoader, MCPConnectionState, MCPErrorCode, MCPServerUnresponsiveError, MCPToolNotFoundError, MCPValidationError, MCP_DEFAULTS, MetricsCollector, MetricsReporter, ModelSchema, MultiSelect, OutOfRangeError, PROGRESS_CHARS, PROGRESS_PATTERNS, PerformanceTracker, PermissionDeniedError, ProfileError, ProfileExistsError, ProfileNotFoundError, ProgressBar, ProgressDialog, ProgressEventType, ProgressSpinner, ProgressStreamManager, PromptEditor, QuickSelect, RATE_LIMIT_PATTERNS, RecoveryActionType, RecoveryStrategyType, RequiredFieldError, ResourceBusyError, ResourceExhaustedError, SPINNER_FRAMES, SUBAGENT_ALIASES2 as SUBAGENT_ALIASES, SUBAGENT_TOOL_MAPPING, SchemaValidationError, SearchableSelect, Select, SessionError, SessionExpiredError, SessionIdSchema, SessionManager, SessionNotFoundError, SessionState, SessionStatusSchema, SessionStorageType, SessionUtils, SimplePromptEditor, SingleSelect, Spinner, SpinnerPresets, StatisticsCalculator, StepProgressBar, SubagentCapability, SubagentSchema, SubagentStatus, SystemError, TUIApp, TUIInputError, TUILayout, TUINotAvailableError, TUIRenderer, TUIScreen, TUIScreenManager, TemplateError, TemplateNotFoundError, TemplateSyntaxError, TimedSpinner, ToolExecutionStatus, TypeValidationError, ValidationError, Validators, calculateRetryDelay, createContextFromCode, createDirectoryIfNotExists, createErrorChain, createErrorContext, createErrorCorrelation, createExecutionEngine, createExecutionRequest, createHeadlessProgress, createKeySequence, createMCPClient, createMCPClientFromConfig, createMetricsCollector, createMetricsReporter, createProfileManager, createSessionManager, enhanceForTerminal, enrichErrorContext, errorManager, errorRecoveryManager, errorReporter, executeHook, executeHooks, findMCPServerPath, formatError, formatErrorForLogging, formatErrorForUser, formatValidationError, getArchitecture, getCacheDirectory, getCategoryPriority, getColorSupport, getConfigDirectory, getCpuUsage, getDataDirectory, getDefaultHooks, getDefaultHooksJson, getEnvVar, getEnvVarWithDefault, getEnvironmentType, getErrorCategory, getErrorCodeCategory, getHomeDirectory, getMCPServerEnvironment, getMemoryUsage, getNodeEnvironment, getPlatform, getProcessInfo, getRecoveryStrategy, getRecoverySuggestions, getShell, getTUICapabilities, getTempDirectory, getTerminalHeight, getTerminalWidth, hasErrorCategory, hasErrorCode, headlessAlert, headlessConfirmation, headlessPromptEditor, headlessSelection, initializeTUIRenderer, isCIEnvironment, isCategoryRetriable, isConnectionError, isConnectionState, isDefined, isDevelopmentMode, isHeadlessEnvironment, isInDocker, isInteractiveTerminal, isJunoTaskError, isKeyboardEvent, isMCPError, isProgressEvent, isRateLimitError, isRetriableErrorCode, isRetryableError, isRunningAsRoot, isSubagentType, isTUIAvailable, isTUIError, isTUISupported, isTimeoutError, isToolError, isValidLogLevel, isValidPath, isValidSessionStatus, isValidSubagent, isValidationError, launchPromptEditor, launchSimplePrompt, loadConfig, migrateError, parseEnvArray, parseEnvBoolean, parseEnvNumber, parseKeyBinding, parseRateLimitResetTime, registerCleanupHandlers, renderAndWait, renderTUI, requiresUserIntervention, safeConsoleOutput, safeTUIExecution, safeTUIRender, sanitizeFilePath, sanitizeGitUrl, sanitizePromptText, sanitizeSessionId, setEnvVar, showAlert, showConfirmation, showSelection, showTUIAlert, supportsColor2 as supportsColor, tuiRenderer, useAppShortcuts, useFormKeys, useFormState, useGlobalShortcuts, useKeyboard, useListState, useNavigationKeys, useProgressAnimation, useTUIContext, useTUIState, useTextEditingKeys, validateCommandOptions, validateConfig, validateEnvironmentVars, validateHooksConfig, validateIterations, validateJson, validateLogLevel, validateMCPServerPath, validateModel, validateNumberRange, validatePaths, validateStringLength, validateSubagent, validateUniqueArray, validateWithFallback, version };
|
|
14724
14767
|
//# sourceMappingURL=index.mjs.map
|
|
14725
14768
|
//# sourceMappingURL=index.mjs.map
|