@hasna/mcps 0.0.11 → 0.0.13

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/dist/index.d.ts CHANGED
@@ -11,5 +11,6 @@ export type { AgentTarget, InstallResult } from "./lib/install.js";
11
11
  export type { McpSource, AddSourceOptions } from "./types.js";
12
12
  export { addMachine, upsertMachine, listMachines, getMachine, updateMachine, removeMachine, seedDefaultMachines, DEFAULT_MACHINE_SEEDS, } from "./lib/machines.js";
13
13
  export { listHasnaMcpCatalog, runFleetHealthCheck, runFleetInstall } from "./lib/fleet.js";
14
+ export { readPackageVersion } from "./lib/version.js";
14
15
  export { connectToServer, disconnectServer, listAllTools, callTool, refreshTools, disconnectAll, } from "./lib/proxy.js";
15
16
  export { getDb, closeDb } from "./lib/db.js";
package/dist/index.js CHANGED
@@ -26404,6 +26404,29 @@ async function runFleetInstall(options = {}, dependencies = {}) {
26404
26404
  }
26405
26405
  }));
26406
26406
  }
26407
+ // src/lib/version.ts
26408
+ import { existsSync as existsSync9, readFileSync as readFileSync5 } from "fs";
26409
+ import { dirname as dirname3, join as join10 } from "path";
26410
+ import { fileURLToPath } from "url";
26411
+ var FALLBACK_VERSION = "0.0.1";
26412
+ function readPackageVersion(moduleUrl, fallback = FALLBACK_VERSION) {
26413
+ const baseDir = dirname3(fileURLToPath(moduleUrl));
26414
+ const candidates = [
26415
+ join10(baseDir, "..", "..", "package.json"),
26416
+ join10(baseDir, "..", "package.json"),
26417
+ join10(baseDir, "package.json")
26418
+ ];
26419
+ for (const candidate of candidates) {
26420
+ if (!existsSync9(candidate))
26421
+ continue;
26422
+ try {
26423
+ const pkg = JSON.parse(readFileSync5(candidate, "utf-8"));
26424
+ if (pkg.version)
26425
+ return pkg.version;
26426
+ } catch {}
26427
+ }
26428
+ return fallback;
26429
+ }
26407
26430
 
26408
26431
  // src/index.ts
26409
26432
  init_db();
@@ -26421,6 +26444,7 @@ export {
26421
26444
  removeServer,
26422
26445
  removeMachine,
26423
26446
  refreshTools,
26447
+ readPackageVersion,
26424
26448
  listSources,
26425
26449
  listServers,
26426
26450
  listMachines,
@@ -0,0 +1 @@
1
+ export declare function readPackageVersion(moduleUrl: string, fallback?: string): string;
@@ -1 +1,5 @@
1
+ #!/usr/bin/env bun
2
+ export { createMcpServer, VERSION } from "./server.js";
3
+ export { buildMcpTools, listTools, registerMcpTools, tools, } from "./tools.js";
4
+ export type { McpsMcpToolDefinition } from "./tools.js";
1
5
  export declare function startMcpServer(): Promise<void>;