juno-code 1.0.50 → 1.0.51

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
@@ -34,7 +34,7 @@ var __export = (target, all) => {
34
34
  var version;
35
35
  var init_version = __esm({
36
36
  "src/version.ts"() {
37
- version = "1.0.50";
37
+ version = "1.0.51";
38
38
  }
39
39
  });
40
40
 
@@ -997,6 +997,9 @@ var init_shell_backend = __esm({
997
997
  if (isPython && subagentType === "pi" && request.arguments?.project_path) {
998
998
  args.push("--cd", String(request.arguments.project_path));
999
999
  }
1000
+ if (isPython && subagentType === "pi" && request.arguments?.live === true) {
1001
+ args.push("--live");
1002
+ }
1000
1003
  if (isPython && this.config.debug) {
1001
1004
  args.push("--verbose");
1002
1005
  }
@@ -1014,12 +1017,19 @@ var init_shell_backend = __esm({
1014
1017
  `Environment variables: ${Object.keys(env2).filter((k) => k.startsWith("JUNO_") || k.startsWith("PI_")).join(", ")}`
1015
1018
  );
1016
1019
  }
1020
+ const isPiLiveMode = isPython && subagentType === "pi" && request.arguments?.live === true;
1021
+ const shouldAttachLiveTerminal = isPiLiveMode && process.stdout.isTTY === true;
1022
+ if (this.config.debug && isPiLiveMode) {
1023
+ engineLogger.debug(
1024
+ `Pi live mode stdio: ${shouldAttachLiveTerminal ? "inherit (interactive TTY or stdout-tty fallback)" : "pipe (headless/non-TTY)"}`
1025
+ );
1026
+ }
1017
1027
  const child = spawn(command, args, {
1018
1028
  env: env2,
1019
1029
  cwd: this.config.workingDirectory,
1020
- stdio: ["pipe", "pipe", "pipe"]
1030
+ stdio: shouldAttachLiveTerminal ? "inherit" : ["pipe", "pipe", "pipe"]
1021
1031
  });
1022
- if (child.stdin) {
1032
+ if (!shouldAttachLiveTerminal && child.stdin) {
1023
1033
  child.stdin.end();
1024
1034
  }
1025
1035
  let stdout2 = "";
@@ -1707,6 +1717,16 @@ function getDefaultHooksJson(indent = 2) {
1707
1717
  return JSON.stringify(DEFAULT_HOOKS, null, indent);
1708
1718
  }
1709
1719
 
1720
+ // src/core/subagent-models.ts
1721
+ init_version();
1722
+ var SUBAGENT_DEFAULT_MODELS = {
1723
+ claude: ":sonnet",
1724
+ codex: ":codex",
1725
+ gemini: ":pro",
1726
+ cursor: "auto",
1727
+ pi: ":pi"
1728
+ };
1729
+
1710
1730
  // src/core/config.ts
1711
1731
  var ENV_VAR_MAPPING = {
1712
1732
  // Core settings
@@ -1756,6 +1776,7 @@ var JunoTaskConfigSchema = z.object({
1756
1776
  defaultBackend: BackendTypeSchema.describe("Default backend to use for task execution"),
1757
1777
  defaultMaxIterations: z.number().int().min(1).max(1e3).describe("Default maximum number of iterations for task execution"),
1758
1778
  defaultModel: z.string().optional().describe("Default model to use for the subagent"),
1779
+ defaultModels: z.record(SubagentTypeSchema, z.string()).optional().describe("Optional per-subagent default model overrides"),
1759
1780
  // Project metadata
1760
1781
  mainTask: z.string().optional().describe("Main task objective for the project"),
1761
1782
  // Logging settings
@@ -1811,6 +1832,7 @@ var DEFAULT_CONFIG = {
1811
1832
  defaultSubagent: "claude",
1812
1833
  defaultBackend: "shell",
1813
1834
  defaultMaxIterations: 1,
1835
+ defaultModels: { ...SUBAGENT_DEFAULT_MODELS },
1814
1836
  // Logging settings
1815
1837
  logLevel: "info",
1816
1838
  verbose: 1,
@@ -2126,7 +2148,7 @@ function parseEnvFileContent(content) {
2126
2148
  const quote = value[0];
2127
2149
  value = value.slice(1, -1);
2128
2150
  if (quote === '"') {
2129
- value = value.replace(/\\n/g, "\n").replace(/\\r/g, "\r").replace(/\\t/g, " ");
2151
+ value = value.replace(/\\n/g, "\n").replace(/\\r/g, "\r").replace(/\\t/g, " ").replace(/\\"/g, '"').replace(/\\\\/g, "\\");
2130
2152
  }
2131
2153
  } else {
2132
2154
  const inlineCommentIndex = value.indexOf(" #");
@@ -2215,13 +2237,16 @@ async function ensureHooksConfig(baseDir) {
2215
2237
  }
2216
2238
  if (!existingConfig.defaultModel) {
2217
2239
  const subagent = existingConfig.defaultSubagent || "claude";
2218
- const modelDefaults = {
2219
- claude: ":sonnet",
2220
- codex: ":codex",
2221
- gemini: ":pro",
2222
- cursor: "auto"
2223
- };
2224
- existingConfig.defaultModel = modelDefaults[subagent] || ":sonnet";
2240
+ existingConfig.defaultModel = SUBAGENT_DEFAULT_MODELS[subagent] || SUBAGENT_DEFAULT_MODELS.claude;
2241
+ needsUpdate = true;
2242
+ }
2243
+ if (!existingConfig.defaultModels || typeof existingConfig.defaultModels !== "object" || Array.isArray(existingConfig.defaultModels)) {
2244
+ const baseDefaults = { ...SUBAGENT_DEFAULT_MODELS };
2245
+ const subagent = existingConfig.defaultSubagent || "claude";
2246
+ if (typeof existingConfig.defaultModel === "string") {
2247
+ baseDefaults[subagent] = existingConfig.defaultModel;
2248
+ }
2249
+ existingConfig.defaultModels = baseDefaults;
2225
2250
  needsUpdate = true;
2226
2251
  }
2227
2252
  if (existingConfig.defaultMaxIterations === 50) {
@@ -3094,6 +3119,7 @@ var ExecutionEngine = class extends EventEmitter {
3094
3119
  continueConversation: context.request.continueConversation
3095
3120
  },
3096
3121
  ...context.request.thinking !== void 0 && { thinking: context.request.thinking },
3122
+ ...context.request.live !== void 0 && { live: context.request.live },
3097
3123
  iteration: iterationNumber
3098
3124
  },
3099
3125
  timeout: context.request.timeoutMs || this.engineConfig.config.mcpTimeout,
@@ -3689,6 +3715,9 @@ function createExecutionRequest(options) {
3689
3715
  if (options.thinking !== void 0) {
3690
3716
  result.thinking = options.thinking;
3691
3717
  }
3718
+ if (options.live !== void 0) {
3719
+ result.live = options.live;
3720
+ }
3692
3721
  return result;
3693
3722
  }
3694
3723