juno-code 1.0.10 → 1.0.12

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/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.10";
47
+ version = "1.0.12";
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({
@@ -4474,8 +4494,8 @@ var DEFAULT_CONFIG = {
4474
4494
  // Paths
4475
4495
  workingDirectory: process.cwd(),
4476
4496
  sessionDirectory: path5.join(process.cwd(), ".juno_task"),
4477
- // Hooks configuration
4478
- hooks: {}
4497
+ // Hooks configuration - populated with default hooks template
4498
+ hooks: getDefaultHooks()
4479
4499
  };
4480
4500
  var GLOBAL_CONFIG_FILE_NAMES = [
4481
4501
  "juno-task.config.json",
@@ -4768,12 +4788,7 @@ async function ensureHooksConfig(baseDir) {
4768
4788
  const configPath = path5.join(configDir, "config.json");
4769
4789
  await fs.ensureDir(configDir);
4770
4790
  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
- };
4791
+ const allHookTypes = getDefaultHooks();
4777
4792
  if (!configExists) {
4778
4793
  const defaultConfig = {
4779
4794
  ...DEFAULT_CONFIG,
@@ -14720,6 +14735,6 @@ function migrateError(error) {
14720
14735
  return error;
14721
14736
  }
14722
14737
 
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 };
14738
+ 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, 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
14739
  //# sourceMappingURL=index.mjs.map
14725
14740
  //# sourceMappingURL=index.mjs.map