@ngockhoale/ckit 0.2.5 → 0.2.6

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/.env.example CHANGED
@@ -3,11 +3,11 @@
3
3
  #
4
4
  # File này chỉ để tùy chỉnh giao diện web "ckit gui". Cần thì sao chép thành .env trong thư mục
5
5
  # bạn chạy "ckit gui" (không commit .env), bỏ dấu # ở dòng muốn dùng rồi điền giá trị.
6
- # Thứ tự ưu tiên: cờ (--host / --port / --lan) > biến môi trường shell > file .env > .ckit/gui.json > mặc định.
6
+ # Thứ tự ưu tiên: cờ (--host / --port / --lan / --local) > biến môi trường shell > file .env > .ckit/gui.json > mặc định.
7
7
  # Đổi xong phải dừng (Ctrl+C) và chạy lại "ckit gui"; mở đúng link mà lệnh in ra.
8
8
 
9
- # Địa chỉ lắng nghe. Mặc định 127.0.0.1 = chỉ máy này mở được.
10
- # 0.0.0.0 = máy khác trong mạng LAN mở được (HTTP thường, không mã hóa; ai có link đều điều khiển được agent).
9
+ # Địa chỉ lắng nghe. Mặc định 0.0.0.0 = máy khác trong mạng LAN mở được (HTTP thường, không mã hóa; ai có link đều điều khiển được agent).
10
+ # 127.0.0.1 = chỉ máy này mở được (tương đương cờ --local).
11
11
  # CKIT_GUI_HOST=
12
12
 
13
13
  # Cổng cố định (1..65535). Mặc định 4317; nếu cổng bận và không đặt cố định, CKit tự chọn cổng khác.
package/README.md CHANGED
@@ -21,9 +21,9 @@ A Director plus Team BA (2 agents discuss, then write one handoff) → Team Impl
21
21
 
22
22
  ```bash
23
23
  ckit # no command, in a terminal: opens the GUI. First time in a project it lands on Config so setup is done there
24
- ckit gui --lan # optional: reachable from other machines on the network. Same via the shell or the project's env file: CKIT_GUI_HOST=0.0.0.0 (plus CKIT_GUI_PORT, CKIT_GUI_TOKEN for a fixed link) or .ckit/gui.json {"host":"0.0.0.0"}; default is this machine only
24
+ ckit gui --local # this machine only. Default is reachable from other machines on the network (0.0.0.0, token always required). Same via the shell or the project's env file: CKIT_GUI_HOST=127.0.0.1 (plus CKIT_GUI_PORT, CKIT_GUI_TOKEN for a fixed link) or .ckit/gui.json {"host":"127.0.0.1"}
25
25
  # in the GUI: attach any files (images, PDF, Word, Excel, drawio, XML...) to a mission or a message; they are stored in the run folder and handed to every team
26
- ckit gui # web Mission Control on 127.0.0.1 (random token URL; --port=<n>, --no-open). Config per agent: cli, model, OpenAI-compatible base URL, API key (stored in ~/.config/ckit/team-secrets.json, 0600, never sent to the browser)
26
+ ckit gui # web Mission Control on 0.0.0.0 (LAN) (random token URL; --port=<n>, --no-open). Config per agent: cli, model, OpenAI-compatible base URL, API key (stored in ~/.config/ckit/team-secrets.json, 0600, never sent to the browser)
27
27
  ckit team --demo # same pipeline in the terminal, fully SIMULATED (no model calls, no cost); --speed=<n> to fast-forward
28
28
  ckit team "<goal>" # real run with the agents in <project>/.ckit/team.json (codex / claude-code / omp / api)
29
29
  ckit team --init # write the default .ckit/team.json (--force overwrites)
@@ -1,4 +1,4 @@
1
- /** host: default 127.0.0.1 (this machine only). Any other value (e.g. 0.0.0.0) is an explicit opt-in to LAN access; the token is still required. */
1
+ /** host: 127.0.0.1 = this machine only; any other value (e.g. 0.0.0.0, the `ckit gui` default) allows LAN access; the token is always required. */
2
2
  export interface GuiServerOptions {
3
3
  projectRoot: string;
4
4
  port?: number;
@@ -31,6 +31,6 @@ export interface GuiSettings {
31
31
  token?: string;
32
32
  tokenIgnored: boolean;
33
33
  }
34
- /** Where `ckit gui` listens. Order: flags > shell environment > project env file > .ckit/gui.json > default (this machine only). */
34
+ /** Where `ckit gui` listens. Order: flags > shell environment > project env file > .ckit/gui.json > default (LAN, 0.0.0.0; token always required). */
35
35
  export declare function resolveGuiSettings(root: string, shellEnv: Readonly<Record<string, string | undefined>>, args: readonly string[], outerRoot?: string): GuiSettings;
36
36
  export declare function runGuiCommand(args: string[]): Promise<number>;
@@ -562,10 +562,11 @@ export function guiWorkspace(cwd) { try {
562
562
  catch {
563
563
  return resolve(cwd);
564
564
  } }
565
- /** Where `ckit gui` listens. Order: flags > shell environment > project env file > .ckit/gui.json > default (this machine only). */
565
+ /** Where `ckit gui` listens. Order: flags > shell environment > project env file > .ckit/gui.json > default (LAN, 0.0.0.0; token always required). */
566
566
  export function resolveGuiSettings(root, shellEnv, args, outerRoot) {
567
567
  // Per-project GUI settings: .ckit/gui.json {"host": "0.0.0.0", "port": 4317}. Flags win over the file.
568
- let port = 4317, open = true, explicitPort = false, host = '127.0.0.1';
568
+ // Default: reachable from the LAN (0.0.0.0); the token is always required. --local / CKIT_GUI_HOST=127.0.0.1 keeps it on this machine only.
569
+ let port = 4317, open = true, explicitPort = false, host = '0.0.0.0';
569
570
  try {
570
571
  const g = JSON.parse(readFileSync(join(root, '.ckit', 'gui.json'), 'utf8'));
571
572
  if (typeof g.host === 'string' && /^[A-Za-z0-9.:-]+$/.test(g.host))
@@ -603,6 +604,8 @@ export function resolveGuiSettings(root, shellEnv, args, outerRoot) {
603
604
  host = hm[1] === 'localhost' ? '127.0.0.1' : hm[1];
604
605
  else if (a === '--lan')
605
606
  host = '0.0.0.0';
607
+ else if (a === '--local')
608
+ host = '127.0.0.1';
606
609
  else if (a === '--no-open')
607
610
  open = false;
608
611
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngockhoale/ckit",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "CKit — local Agent Company: a Director plus BA / Implement / QC teams running your own codex, claude and omp CLIs, with a web Mission Control (ckit gui).",
5
5
  "type": "module",
6
6
  "bin": {