@hasna/instructions 0.5.4 → 0.5.5

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.
@@ -42,4 +42,13 @@ export declare function exactStoreHome(env?: NodeJS.ProcessEnv): string | undefi
42
42
  export declare function getConfigsStoreHome(env?: NodeJS.ProcessEnv): string;
43
43
  /** The store's SQLite database path under the effective store home. */
44
44
  export declare function getConfigsStoreDbPath(env?: NodeJS.ProcessEnv): string;
45
+ /**
46
+ * The local database path surfaced by server status/health surfaces (e.g. the
47
+ * MCP server's `db_path` field). The exact `HASNA_INSTRUCTIONS_DB_PATH`
48
+ * override wins; otherwise the resolver-derived store db path (legacy
49
+ * `~/.hasna/instructions/instructions.db` until the XDG config home is
50
+ * adopted, matching `db/database.ts`). A server status must never hardcode the
51
+ * legacy literal — the store can live at the resolver home.
52
+ */
53
+ export declare function getReportedDbPath(env?: NodeJS.ProcessEnv): string;
45
54
  //# sourceMappingURL=app-home.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-home.d.ts","sourceRoot":"","sources":["../../src/lib/app-home.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAM3D,yGAAyG;AACzG,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE5E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE9E;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAIT;AAED,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAGvF;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAKhF;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAElF"}
1
+ {"version":3,"file":"app-home.d.ts","sourceRoot":"","sources":["../../src/lib/app-home.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAM3D,yGAAyG;AACzG,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE5E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE9E;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAIT;AAED,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAGvF;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAKhF;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAElF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAI9E"}
package/dist/mcp/index.js CHANGED
@@ -195,6 +195,15 @@ function getConfigsStoreHome(env = process.env) {
195
195
  const resolved = resolverStoreHome(env);
196
196
  return adoptResolverStoreHome(resolved, env) ? resolve(resolved) : legacyStoreHome(env);
197
197
  }
198
+ function getConfigsStoreDbPath(env = process.env) {
199
+ return join3(getConfigsStoreHome(env), "instructions.db");
200
+ }
201
+ function getReportedDbPath(env = process.env) {
202
+ const override = env["HASNA_INSTRUCTIONS_DB_PATH"];
203
+ if (typeof override === "string" && override.length > 0)
204
+ return override;
205
+ return getConfigsStoreDbPath(env);
206
+ }
198
207
  var HASNA_CONFIGS_HOME_ENV = "HASNA_CONFIGS_HOME";
199
208
  var init_app_home = __esm(() => {
200
209
  init_dist();
@@ -8181,7 +8190,7 @@ var init_sync_dir = __esm(() => {
8181
8190
  var require_package = __commonJS((exports, module) => {
8182
8191
  module.exports = {
8183
8192
  name: "@hasna/instructions",
8184
- version: "0.5.4",
8193
+ version: "0.5.5",
8185
8194
  description: "AI coding agent instruction & configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
8186
8195
  type: "module",
8187
8196
  main: "dist/index.js",
@@ -8313,6 +8322,7 @@ function getPackageVersion() {
8313
8322
 
8314
8323
  // src/mcp/server.ts
8315
8324
  init_config_store();
8325
+ init_app_home();
8316
8326
  init_apply();
8317
8327
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
8318
8328
  import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
@@ -8576,7 +8586,7 @@ function buildServer() {
8576
8586
  drifted,
8577
8587
  drifted_configs: driftedSlugs.slice(0, 5),
8578
8588
  missing,
8579
- db_path: process.env["HASNA_INSTRUCTIONS_DB_PATH"] || "~/.hasna/instructions/instructions.db"
8589
+ db_path: getReportedDbPath()
8580
8590
  });
8581
8591
  }
8582
8592
  case "sync_known": {
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AA4EnE,wBAAgB,WAAW,IAAI,MAAM,CA+VpC"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AA6EnE,wBAAgB,WAAW,IAAI,MAAM,CA+VpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/instructions",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "AI coding agent instruction & configuration manager — store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",