@agent-smith/cli 0.0.51 → 0.0.52

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.
Files changed (2) hide show
  1. package/dist/db/db.js +2 -0
  2. package/package.json +1 -1
package/dist/db/db.js CHANGED
@@ -1,11 +1,13 @@
1
1
  import DatabaseConstructor from "better-sqlite3";
2
2
  import { schemas } from "./schemas.js";
3
3
  import path from "path";
4
+ import { createDirectoryIfNotExists } from "../cmd/sys/dirs.js";
4
5
  const confDir = path.join(process.env.HOME ?? "~/", ".config/agent-smith/cli");
5
6
  const dbPath = path.join(confDir, "config.db");
6
7
  let db;
7
8
  function initDb(isVerbose, execSchema = false) {
8
9
  if (execSchema) {
10
+ createDirectoryIfNotExists(confDir, true);
9
11
  db = new DatabaseConstructor(dbPath, { fileMustExist: false });
10
12
  schemas.forEach((s) => {
11
13
  db.exec(s);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@agent-smith/cli",
3
3
  "description": "Agent Smith: terminal client for language model agents",
4
4
  "repository": "https://github.com/synw/agent-smith",
5
- "version": "0.0.51",
5
+ "version": "0.0.52",
6
6
  "scripts": {
7
7
  "buildrl": "rm -rf dist/* && rollup -c",
8
8
  "build": "rm -rf dist/* && tsc",