juno-code 1.0.31 → 1.0.33
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/bin/cli.js +201 -143
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +200 -142
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/index.js +32 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -3
- package/dist/index.mjs.map +1 -1
- package/dist/templates/services/__pycache__/codex.cpython-38.pyc +0 -0
- package/dist/templates/services/claude.py +14 -0
- package/dist/templates/services/codex.py +254 -16
- package/package.json +1 -1
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.33";
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
function isHeadlessEnvironment() {
|
|
@@ -4437,6 +4437,8 @@ var ENV_VAR_MAPPING = {
|
|
|
4437
4437
|
JUNO_CODE_MCP_RETRIES: "mcpRetries",
|
|
4438
4438
|
JUNO_CODE_MCP_SERVER_PATH: "mcpServerPath",
|
|
4439
4439
|
JUNO_CODE_MCP_SERVER_NAME: "mcpServerName",
|
|
4440
|
+
// Hook settings
|
|
4441
|
+
JUNO_CODE_HOOK_COMMAND_TIMEOUT: "hookCommandTimeout",
|
|
4440
4442
|
// TUI settings
|
|
4441
4443
|
JUNO_CODE_INTERACTIVE: "interactive",
|
|
4442
4444
|
JUNO_CODE_HEADLESS_MODE: "headlessMode",
|
|
@@ -4460,6 +4462,8 @@ var LEGACY_ENV_VAR_MAPPING = {
|
|
|
4460
4462
|
JUNO_TASK_MCP_RETRIES: "mcpRetries",
|
|
4461
4463
|
JUNO_TASK_MCP_SERVER_PATH: "mcpServerPath",
|
|
4462
4464
|
JUNO_TASK_MCP_SERVER_NAME: "mcpServerName",
|
|
4465
|
+
// Hook settings
|
|
4466
|
+
JUNO_TASK_HOOK_COMMAND_TIMEOUT: "hookCommandTimeout",
|
|
4463
4467
|
// TUI settings
|
|
4464
4468
|
JUNO_TASK_INTERACTIVE: "interactive",
|
|
4465
4469
|
JUNO_TASK_HEADLESS_MODE: "headlessMode",
|
|
@@ -4491,6 +4495,8 @@ var JunoTaskConfigSchema = z.object({
|
|
|
4491
4495
|
mcpRetries: z.number().int().min(0).max(10).describe("Number of retries for MCP operations"),
|
|
4492
4496
|
mcpServerPath: z.string().optional().describe("Path to MCP server executable (auto-discovered if not specified)"),
|
|
4493
4497
|
mcpServerName: z.string().optional().describe('Named MCP server to connect to (e.g., "roundtable-ai")'),
|
|
4498
|
+
// Hook settings
|
|
4499
|
+
hookCommandTimeout: z.number().int().min(1e3).max(36e5).optional().describe("Timeout for individual hook commands in milliseconds (default: 300000 = 5 minutes)"),
|
|
4494
4500
|
// TUI settings
|
|
4495
4501
|
interactive: z.boolean().describe("Enable interactive mode"),
|
|
4496
4502
|
headlessMode: z.boolean().describe("Enable headless mode (no TUI)"),
|
|
@@ -6551,7 +6557,8 @@ var hookLogger = logger.child("SYSTEM" /* SYSTEM */, { component: "hooks" });
|
|
|
6551
6557
|
async function executeHook(hookType, hooks, context = {}, options = {}) {
|
|
6552
6558
|
const startTime = Date.now();
|
|
6553
6559
|
const {
|
|
6554
|
-
commandTimeout =
|
|
6560
|
+
commandTimeout = 3e5,
|
|
6561
|
+
// 5 minutes default (increased from 30s to support long-running hook scripts)
|
|
6555
6562
|
env: env2 = {},
|
|
6556
6563
|
continueOnError = true,
|
|
6557
6564
|
logContext = "SYSTEM" /* SYSTEM */
|
|
@@ -6626,8 +6633,12 @@ async function executeHook(hookType, hooks, context = {}, options = {}) {
|
|
|
6626
6633
|
env: execEnv,
|
|
6627
6634
|
// Capture both stdout and stderr
|
|
6628
6635
|
all: true,
|
|
6629
|
-
reject: false
|
|
6636
|
+
reject: false,
|
|
6630
6637
|
// Don't throw on non-zero exit codes
|
|
6638
|
+
// Use input: '' to provide empty stdin and properly close it (sends EOF)
|
|
6639
|
+
// This prevents commands from hanging waiting for stdin while still
|
|
6640
|
+
// allowing internal pipe operations to work correctly
|
|
6641
|
+
input: ""
|
|
6631
6642
|
});
|
|
6632
6643
|
const duration = Date.now() - commandStartTime;
|
|
6633
6644
|
const success2 = result2.exitCode === 0;
|
|
@@ -7148,6 +7159,8 @@ var ExecutionEngine = class extends EventEmitter {
|
|
|
7148
7159
|
maxIterations: context.request.maxIterations,
|
|
7149
7160
|
instruction: context.request.instruction
|
|
7150
7161
|
}
|
|
7162
|
+
}, {
|
|
7163
|
+
commandTimeout: this.engineConfig.config.hookCommandTimeout
|
|
7151
7164
|
});
|
|
7152
7165
|
}
|
|
7153
7166
|
} catch (error) {
|
|
@@ -7180,6 +7193,8 @@ var ExecutionEngine = class extends EventEmitter {
|
|
|
7180
7193
|
duration: context.endTime ? context.endTime.getTime() - context.startTime.getTime() : 0,
|
|
7181
7194
|
success: context.status === "completed" /* COMPLETED */
|
|
7182
7195
|
}
|
|
7196
|
+
}, {
|
|
7197
|
+
commandTimeout: this.engineConfig.config.hookCommandTimeout
|
|
7183
7198
|
});
|
|
7184
7199
|
}
|
|
7185
7200
|
} catch (error) {
|
|
@@ -7231,6 +7246,8 @@ var ExecutionEngine = class extends EventEmitter {
|
|
|
7231
7246
|
maxIterations: context.request.maxIterations,
|
|
7232
7247
|
subagent: context.request.subagent
|
|
7233
7248
|
}
|
|
7249
|
+
}, {
|
|
7250
|
+
commandTimeout: this.engineConfig.config.hookCommandTimeout
|
|
7234
7251
|
});
|
|
7235
7252
|
}
|
|
7236
7253
|
} catch (error) {
|
|
@@ -7248,6 +7265,8 @@ var ExecutionEngine = class extends EventEmitter {
|
|
|
7248
7265
|
...context.request.allowedTools !== void 0 && { allowedTools: context.request.allowedTools },
|
|
7249
7266
|
...context.request.appendAllowedTools !== void 0 && { appendAllowedTools: context.request.appendAllowedTools },
|
|
7250
7267
|
...context.request.disallowedTools !== void 0 && { disallowedTools: context.request.disallowedTools },
|
|
7268
|
+
...context.request.resume !== void 0 && { resume: context.request.resume },
|
|
7269
|
+
...context.request.continueConversation !== void 0 && { continueConversation: context.request.continueConversation },
|
|
7251
7270
|
iteration: iterationNumber
|
|
7252
7271
|
},
|
|
7253
7272
|
timeout: context.request.timeoutMs || this.engineConfig.config.mcpTimeout,
|
|
@@ -7295,6 +7314,8 @@ var ExecutionEngine = class extends EventEmitter {
|
|
|
7295
7314
|
duration: iterationResult.duration,
|
|
7296
7315
|
toolCallStatus: iterationResult.toolResult.status
|
|
7297
7316
|
}
|
|
7317
|
+
}, {
|
|
7318
|
+
commandTimeout: this.engineConfig.config.hookCommandTimeout
|
|
7298
7319
|
});
|
|
7299
7320
|
}
|
|
7300
7321
|
} catch (error) {
|
|
@@ -7343,6 +7364,8 @@ var ExecutionEngine = class extends EventEmitter {
|
|
|
7343
7364
|
error: mcpError.message,
|
|
7344
7365
|
errorType: mcpError.type
|
|
7345
7366
|
}
|
|
7367
|
+
}, {
|
|
7368
|
+
commandTimeout: this.engineConfig.config.hookCommandTimeout
|
|
7346
7369
|
});
|
|
7347
7370
|
}
|
|
7348
7371
|
} catch (hookError) {
|
|
@@ -7699,6 +7722,12 @@ function createExecutionRequest(options) {
|
|
|
7699
7722
|
if (options.mcpServerName !== void 0) {
|
|
7700
7723
|
result.mcpServerName = options.mcpServerName;
|
|
7701
7724
|
}
|
|
7725
|
+
if (options.resume !== void 0) {
|
|
7726
|
+
result.resume = options.resume;
|
|
7727
|
+
}
|
|
7728
|
+
if (options.continueConversation !== void 0) {
|
|
7729
|
+
result.continueConversation = options.continueConversation;
|
|
7730
|
+
}
|
|
7702
7731
|
return result;
|
|
7703
7732
|
}
|
|
7704
7733
|
|