agentlas 1.0.62 → 1.0.64

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,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.64 — 2026-08-29
4
+
5
+ - First-run database bootstrap now refuses symbolic links and non-file entries
6
+ at `agentlas.sqlite` instead of following them for permission changes and
7
+ runtime access.
8
+ - A competing bootstrap is accepted only after its winning database path is a
9
+ real, non-empty file; undeletable empty placeholders now fail with the exact
10
+ cause instead of being reported as a successful concurrent initialization.
11
+ - The public runtime guidance now reflects that Kimi, Grok, and Cursor execute
12
+ through the shared ACP driver instead of describing their retired refusal.
13
+
14
+ ## 1.0.63 — 2026-08-29
15
+
16
+ - `agentlas update --json` now reads the centralized output-mode context after
17
+ global flags are consumed, so it emits the promised JSON document instead of
18
+ falling back to human-readable lines.
19
+
3
20
  ## 1.0.62 — 2026-08-29
4
21
 
5
22
  - Terminal sessions now preserve ACP conversation identity and history across
package/README.md CHANGED
@@ -27,7 +27,9 @@ Agent Trust is our product principle: agent packages are treated as portable, ow
27
27
  | **Agent CLI** | Requires at least one supported runtime CLI: `agy` (Antigravity, preferred), `claude`, `codex`, or legacy `gemini` in your `PATH`. Halts honestly with `no_runtime` if none are found (no fake model responses). |
28
28
  | **OS** | macOS is verified by the current local release gate. Linux is covered by the public adapter/CI contract. A Windows launcher is provided, but this release does not claim independent end-to-end Windows verification. |
29
29
 
30
- *Note: `kimi`, `grok`, and `cursor-agent` are detected by diagnostics (`doctor`) but not yet executable (`has no v2 streaming driver yet`). Supported active runtimes are `claude-code`, `codex`, `agy` (Antigravity), and legacy `gemini`.*
30
+ *Note: active runtimes include `claude-code`, `codex`, `agy` (Antigravity),
31
+ legacy `gemini`, and the shared ACP-backed `kimi`, `grok`, and `cursor-agent`
32
+ adapters. `doctor` reports the exact locally executable set.*
31
33
 
32
34
  ## Installation
33
35
 
@@ -278,7 +280,7 @@ agentlas doctor # Checks database, PATH runtimes, active CLI drivers, and c
278
280
  agentlas --where # Outputs JSON diagnostic of launcher, engine, DB paths, driver, and Node version
279
281
  ```
280
282
 
281
- - **`no_runtime: no agent CLI found`**: Connect Antigravity and put `agy` on `PATH` first, or install `claude`/`codex`; `gemini` remains available as a legacy CLI. Note that `kimi`/`grok`/`cursor-agent` are detected by `doctor` but do not yet have streaming execution drivers.
283
+ - **`no_runtime: no agent CLI found`**: Connect Antigravity and put `agy` on `PATH` first, or install `claude`/`codex`; `gemini` remains available as a legacy CLI. Kimi, Grok, and Cursor use the shared ACP driver when their local CLIs are available.
282
284
  - **`runtime '<kind>' has no v2 streaming driver yet`**: Specified `--runtime` is not supported for active execution. Supported values: `claude-code`, `codex`, `agy` (Antigravity), `gemini` (legacy).
283
285
  - **`Node vX — Node 22+ (node:sqlite) is required when better-sqlite3 is unavailable`**: `better-sqlite3` native build failed on Node 20/21. Upgrade to Node 22+ or install build tools for native compilation.
284
286
  - **`storm`/`context`/`hep` halting due to missing runtime**: Agentlas OS core runtime is missing. Install Agentlas OS or set `HEPHAESTUS_BIN=<path>`.
package/bin/agentlas.cjs CHANGED
@@ -68,6 +68,20 @@ function securePrivateMode(target, mode) {
68
68
  fs.chmodSync(target, mode);
69
69
  }
70
70
 
71
+ function databaseFileStat(target) {
72
+ let stat;
73
+ try {
74
+ stat = fs.lstatSync(target);
75
+ } catch (error) {
76
+ if (error && error.code === "ENOENT") return null;
77
+ throw error;
78
+ }
79
+ if (stat.isSymbolicLink() || !stat.isFile()) {
80
+ throw new Error(`Agentlas database path must be a regular file: ${target}`);
81
+ }
82
+ return stat;
83
+ }
84
+
71
85
  // ── SQLite 로더 (부트스트랩용): better-sqlite3 → node:sqlite ──
72
86
  // require.resolve가 아니라 실제 로드로 판별한다 — ABI가 깨진 better-sqlite3나
73
87
  // node:sqlite가 아직 없는/플래그가 필요한 Node(≤22.4 등)를 정확히 걸러낸다.
@@ -141,14 +155,17 @@ function bootstrapDbIfMissing() {
141
155
  // 잡힌 파일이므로 없는 것으로 취급해 정상 부트스트랩 경로를 태운다. 내용이 있는데
142
156
  // 손상된 경우는 여기서 판단하지 않는다 — 그건 복구지 부트스트랩이 아니고, 멀쩡한
143
157
  // DB 를 빈 것으로 오판해 덮어쓰는 위험이 훨씬 크다.
144
- if (exists(p)) {
145
- let empty = false;
146
- try { empty = fs.statSync(p).size === 0; } catch { empty = false; }
147
- if (!empty) {
158
+ const existing = databaseFileStat(p);
159
+ if (existing) {
160
+ if (existing.size > 0) {
148
161
  securePrivateMode(p, 0o600);
149
162
  return { created: false, path: p };
150
163
  }
151
- try { fs.rmSync(p, { force: true }); } catch { /* 지울 수 없으면 아래 link 가 EEXIST 로 알려준다 */ }
164
+ try {
165
+ fs.rmSync(p);
166
+ } catch (error) {
167
+ throw new Error(`Empty Agentlas database could not be replaced: ${error && error.message ? error.message : error}`);
168
+ }
152
169
  }
153
170
  const schemaFile = path.join(PKG_ROOT, "engine", "bootstrap-schema.sql");
154
171
  if (!exists(schemaFile)) {
@@ -189,12 +206,23 @@ function bootstrapDbIfMissing() {
189
206
  if (!e || e.code !== "EEXIST") {
190
207
  throw new Error(`Atomic database bootstrap failed: ${e && e.message ? e.message : e}`);
191
208
  }
209
+ // EEXIST only means another path entry won the name. It is a successful
210
+ // concurrent bootstrap only if that winner is already a real, non-empty
211
+ // database file; a symlink/directory/empty placeholder must fail closed.
212
+ const winner = databaseFileStat(p);
213
+ if (!winner || winner.size === 0) {
214
+ throw new Error(`Concurrent Agentlas database bootstrap produced an invalid file: ${p}`);
215
+ }
192
216
  } finally {
193
217
  try { fs.rmSync(temp, { force: true }); } catch { /* noop */ }
194
218
  try { fs.rmSync(temp + "-journal", { force: true }); } catch { /* noop */ }
195
219
  try { fs.rmSync(temp + "-wal", { force: true }); } catch { /* noop */ }
196
220
  try { fs.rmSync(temp + "-shm", { force: true }); } catch { /* noop */ }
197
221
  }
222
+ const finalStat = databaseFileStat(p);
223
+ if (!finalStat || finalStat.size === 0) {
224
+ throw new Error(`Agentlas database bootstrap did not produce a valid file: ${p}`);
225
+ }
198
226
  securePrivateMode(p, 0o600);
199
227
  return { created, path: p };
200
228
  }
@@ -48,9 +48,9 @@ async function checkNpmLatest({ fetch: fetchImpl, timeoutMs = 8_000 } = {}) {
48
48
  };
49
49
  }
50
50
 
51
- async function run(ctx, args) {
52
- const json = args.includes("--json");
53
- const status = await checkNpmLatest();
51
+ async function run(ctx, args, deps = {}) {
52
+ const json = ctx.output?.format === "json" || args.includes("--json");
53
+ const status = await checkNpmLatest(deps);
54
54
  if (json) {
55
55
  ctx.out(JSON.stringify(status, null, 2));
56
56
  return 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentlas",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
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"