agentlas 1.0.43 → 1.0.44

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.44 — 2026-08-11
4
+
5
+ Turn the interactive shell on once and keep it.
6
+
7
+ - `/shell on` saves the choice, so plain `agentlas` opens the interactive shell
8
+ from then on; `/shell off` returns to the classic REPL. Both shells accept the
9
+ command, so you can always get back out.
10
+ - `AGENTLAS_TUI=1` still works and takes precedence for a single run.
11
+
3
12
  ## 1.0.43 — 2026-08-11
4
13
 
5
14
  Zero runtime dependencies. The renderer now lives in this repository.
@@ -24,6 +24,7 @@ const SLASH_COMMANDS = [
24
24
  { command: "/graph", args: "[run <이름>]", ko: "저장된 자동화 그래프", en: "Saved automation graphs" },
25
25
  { command: "/mcp", args: "", ko: "MCP 서버 목록", en: "MCP servers" },
26
26
  { command: "/doctor", args: "", ko: "런타임·데이터 점검", en: "Health check" },
27
+ { command: "/shell", args: "on|off", ko: "대화형 셸 켜기/끄기", en: "Turn the interactive shell on or off" },
27
28
  { command: "/runtime", args: "<kind>", ko: "새 세션 런타임 지정", en: "Set runtime for new sessions" },
28
29
  { command: "/model", args: "<id|default>", ko: "새 세션 모델 지정", en: "Set model for new sessions" },
29
30
  { command: "/effort", args: "<level|none>", ko: "새 세션 추론 강도 지정", en: "Set effort for new sessions" },
@@ -125,11 +125,17 @@ async function startRepl(ctx, opts = {}) {
125
125
  }
126
126
 
127
127
  /*
128
- * 대화형 셸 opt-in (D3 Phase 2): AGENTLAS_TUI=1 + TTY.
129
- * 온보딩 마법사(위 readline 블록)가 먼저 끝난 뒤 진입한다 — 순차 실행이라
130
- * stdin 경합이 없고, 첫 실행 사용자도 새 셸을 쓸 수 있다(증분 2c).
128
+ * 대화형 셸 (D3 Phase 2~3). 온보딩 마법사(위 readline 블록)가 먼저 끝난 뒤
129
+ * 진입한다 — 순차 실행이라 stdin 경합이 없다.
130
+ *
131
+ * 선택 순서: 환경변수 > 저장된 설정. 환경변수는 그 실행에만, prefs.shell 은
132
+ * 영속이다(/shell on 으로 저장). 매번 환경변수를 치게 만들면 아무도 안 쓴다.
131
133
  */
132
- if (/^(1|true|on)$/i.test(String(process.env.AGENTLAS_TUI || "")) && process.stdin.isTTY) {
134
+ const shellEnv = String(process.env.AGENTLAS_TUI || "").trim();
135
+ const shellChoice = shellEnv
136
+ ? /^(1|true|on)$/i.test(shellEnv)
137
+ : (ctx.prefs && ctx.prefs.shell) === "interactive";
138
+ if (shellChoice && process.stdin.isTTY) {
133
139
  return require("./shell.cjs").startShell(ctx, opts);
134
140
  }
135
141
  const orch = new Orchestrator({ db, lang: ctx.lang });
@@ -690,6 +696,30 @@ function handleSlash(ctx, cmdline, api) {
690
696
  ctx.out(ctx.uiInstance.c.dim(`Shift-Tab: ${i18n.t(ctx.lang, "help.shiftTab")}`));
691
697
  return;
692
698
  }
699
+ case "shell": {
700
+ /*
701
+ * 새 대화형 셸 켜기/끄기. 저장하고 즉시 안내한다 — 프로세스 중간에
702
+ * stdin 소유권을 바꾸면 지금 도는 readline 과 경합한다(실사고 계열).
703
+ */
704
+ const want = String(rest[0] || "").toLowerCase();
705
+ if (!["on", "off"].includes(want)) {
706
+ const now = (ctx.prefs && ctx.prefs.shell) === "interactive";
707
+ ui.line(ui.c.dim(`Usage: /shell on|off (${en ? "currently" : "현재"}: ${now ? "on" : "off"})`));
708
+ return;
709
+ }
710
+ const config = require("../agentlas-config.cjs");
711
+ const { userDataDir } = require("../core/paths.cjs");
712
+ config.updatePrefs(userDataDir(), { shell: want === "on" ? "interactive" : "classic" });
713
+ if (ctx.prefs) ctx.prefs.shell = want === "on" ? "interactive" : "classic";
714
+ ui.line(want === "on"
715
+ ? ui.c.dim(en
716
+ ? "Interactive shell enabled — restart agentlas to enter it (/shell off to revert)."
717
+ : "대화형 셸을 켰습니다 — agentlas 를 다시 실행하면 그 화면으로 들어갑니다 (/shell off 로 되돌림).")
718
+ : ui.c.dim(en
719
+ ? "Interactive shell disabled — restart agentlas for the classic REPL."
720
+ : "대화형 셸을 껐습니다 — agentlas 를 다시 실행하면 기본 REPL 입니다."));
721
+ return;
722
+ }
693
723
  case "agents": case "list": require("../commands/list.cjs").run(ctx, rest); return;
694
724
  // doctor 는 세션 검증(네트워크)으로 async 가 됐다 — 특례로 fire-and-forget 하면
695
725
  // REPL 종료가 출력을 잘라먹는다. promise 를 track 하는 default 폴스루로 보낸다.
@@ -288,6 +288,19 @@ async function startShell(ctx, opts = {}) {
288
288
  } catch { /* 렌더 실패 → 아래 클래식 폴스루가 텍스트로 보여준다 */ }
289
289
  }
290
290
  }
291
+ // 셸 끄기 — 여기서도 되돌아갈 수 있어야 한다(들어와서 못 나가면 갇힌다)
292
+ if (cmd === "shell") {
293
+ const want = String(rest[0] || "").toLowerCase();
294
+ if (!["on", "off"].includes(want)) { ui.line(ui.c.dim("Usage: /shell on|off (현재: on)")); return; }
295
+ const config = require("../agentlas-config.cjs");
296
+ const { userDataDir } = require("../core/paths.cjs");
297
+ config.updatePrefs(userDataDir(), { shell: want === "on" ? "interactive" : "classic" });
298
+ ui.line(ui.c.dim(want === "on"
299
+ ? (en ? "Already here." : "이미 이 셸입니다.")
300
+ : (en ? "Interactive shell disabled — restart agentlas for the classic REPL."
301
+ : "대화형 셸을 껐습니다 — agentlas 를 다시 실행하면 기본 REPL 입니다.")));
302
+ return;
303
+ }
291
304
  // 데스크탑 대응 화면 (Phase 3) — 정직 정지였던 표면들을 실물로 대체
292
305
  {
293
306
  const screens = require("./screens.cjs");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentlas",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "description": "Agentlas project terminal — run project controllers and task-scoped agent teams from the terminal. Standalone: no desktop app process required.",
5
5
  "bin": {
6
6
  "agentlas": "bin/agentlas.cjs"