@hasna/configs 0.2.20 → 0.2.22

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/mcp/index.js +93 -1
  2. package/package.json +1 -1
package/dist/mcp/index.js CHANGED
@@ -16,6 +16,7 @@ var __toESM = (mod, isNodeMode, target) => {
16
16
  });
17
17
  return to;
18
18
  };
19
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
19
20
  var __export = (target, all) => {
20
21
  for (var name in all)
21
22
  __defProp(target, name, {
@@ -992,6 +993,89 @@ var init_sync = __esm(() => {
992
993
  ];
993
994
  });
994
995
 
996
+ // package.json
997
+ var require_package = __commonJS((exports, module) => {
998
+ module.exports = {
999
+ name: "@hasna/configs",
1000
+ version: "0.2.22",
1001
+ description: "AI coding agent configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + REST API + Dashboard.",
1002
+ type: "module",
1003
+ main: "dist/index.js",
1004
+ types: "dist/index.d.ts",
1005
+ bin: {
1006
+ configs: "dist/cli/index.js",
1007
+ "configs-mcp": "dist/mcp/index.js",
1008
+ "configs-serve": "dist/server/index.js"
1009
+ },
1010
+ exports: {
1011
+ ".": {
1012
+ types: "./dist/index.d.ts",
1013
+ import: "./dist/index.js"
1014
+ }
1015
+ },
1016
+ files: [
1017
+ "dist",
1018
+ "dashboard/dist",
1019
+ "LICENSE",
1020
+ "README.md"
1021
+ ],
1022
+ scripts: {
1023
+ build: "bun build src/cli/index.tsx --outdir dist/cli --target bun --external ink --external react --external chalk --external @modelcontextprotocol/sdk && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external @modelcontextprotocol/sdk && bun build src/server/index.ts --outdir dist/server --target bun && bun build src/index.ts --outdir dist --target bun && tsc --emitDeclarationOnly --outDir dist",
1024
+ "build:dashboard": "cd dashboard && bun run build",
1025
+ typecheck: "tsc --noEmit",
1026
+ test: "bun test",
1027
+ "dev:cli": "bun run src/cli/index.tsx",
1028
+ "dev:mcp": "bun run src/mcp/index.ts",
1029
+ "dev:serve": "bun run src/server/index.ts",
1030
+ seed: "bun run scripts/seed.ts",
1031
+ prepublishOnly: "bun run build"
1032
+ },
1033
+ keywords: [
1034
+ "configs",
1035
+ "dotfiles",
1036
+ "agent-config",
1037
+ "claude",
1038
+ "codex",
1039
+ "gemini",
1040
+ "mcp",
1041
+ "ai",
1042
+ "coding-agent",
1043
+ "cli",
1044
+ "dashboard"
1045
+ ],
1046
+ publishConfig: {
1047
+ access: "public"
1048
+ },
1049
+ repository: {
1050
+ type: "git",
1051
+ url: "https://github.com/hasna/open-configs.git"
1052
+ },
1053
+ homepage: "https://github.com/hasna/open-configs",
1054
+ bugs: {
1055
+ url: "https://github.com/hasna/open-configs/issues"
1056
+ },
1057
+ engines: {
1058
+ bun: ">=1.0.0"
1059
+ },
1060
+ author: "Andrei Hasna <andrei@hasna.com>",
1061
+ license: "Apache-2.0",
1062
+ dependencies: {
1063
+ "@modelcontextprotocol/sdk": "^1.12.1",
1064
+ chalk: "^5.4.1",
1065
+ commander: "^13.1.0",
1066
+ hono: "^4.7.4",
1067
+ ink: "^5.2.0",
1068
+ react: "^18.3.1",
1069
+ zod: "^3.24.2"
1070
+ },
1071
+ devDependencies: {
1072
+ "@types/bun": "^1.2.4",
1073
+ "@types/react": "^18.3.18",
1074
+ typescript: "^5.7.3"
1075
+ }
1076
+ };
1077
+ });
1078
+
995
1079
  // src/lib/template.ts
996
1080
  var exports_template = {};
997
1081
  __export(exports_template, {
@@ -1100,6 +1184,7 @@ var TOOL_DOCS = {
1100
1184
  render_template: "Render a template config with variable substitution. Params: id_or_slug, vars? (object of KEY:VALUE), use_env? (fill from env vars). Returns rendered content.",
1101
1185
  scan_secrets: "Scan configs for unredacted secrets. Params: id_or_slug? (omit for all known), fix? (true to redact in-place). Returns findings.",
1102
1186
  sync_known: "Sync all known config files from disk into DB. Params: agent?, category?. Replaces sync_directory for standard use.",
1187
+ sync_project: "Sync project-scoped configs (CLAUDE.md, .mcp.json, AGENTS.md, rules/*.md) from a project dir. Params: project_dir (default: cwd).",
1103
1188
  search_tools: "Search tool descriptions. Params: query. Returns matching tool names and descriptions.",
1104
1189
  describe_tools: "Get full descriptions for tools. Params: names? (array). Returns tool docs."
1105
1190
  };
@@ -1122,6 +1207,7 @@ var ALL_LEAN_TOOLS = [
1122
1207
  { name: "get_snapshot", inputSchema: { type: "object", properties: { config_id_or_slug: { type: "string" }, version: { type: "number" } }, required: ["config_id_or_slug"] } },
1123
1208
  { name: "get_status", inputSchema: { type: "object", properties: {} } },
1124
1209
  { name: "sync_known", inputSchema: { type: "object", properties: { agent: { type: "string" }, category: { type: "string" } } } },
1210
+ { name: "sync_project", inputSchema: { type: "object", properties: { project_dir: { type: "string" } } } },
1125
1211
  { name: "render_template", inputSchema: { type: "object", properties: { id_or_slug: { type: "string" }, vars: { type: "object" }, use_env: { type: "boolean" } }, required: ["id_or_slug"] } },
1126
1212
  { name: "scan_secrets", inputSchema: { type: "object", properties: { id_or_slug: { type: "string" }, fix: { type: "boolean" } } } },
1127
1213
  { name: "search_tools", inputSchema: { type: "object", properties: { query: { type: "string" } }, required: ["query"] } },
@@ -1133,7 +1219,7 @@ function ok(data) {
1133
1219
  function err(msg) {
1134
1220
  return { content: [{ type: "text", text: JSON.stringify({ error: msg }) }], isError: true };
1135
1221
  }
1136
- var server = new Server({ name: "configs", version: "0.1.0" }, { capabilities: { tools: {} } });
1222
+ var server = new Server({ name: "configs", version: require_package().version }, { capabilities: { tools: {} } });
1137
1223
  var LEAN_TOOLS = profileFilter && profileFilter.length > 0 ? ALL_LEAN_TOOLS.filter((t) => profileFilter.includes(t.name)) : ALL_LEAN_TOOLS;
1138
1224
  server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: LEAN_TOOLS }));
1139
1225
  server.setRequestHandler(CallToolRequestSchema, async (req) => {
@@ -1251,6 +1337,12 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
1251
1337
  });
1252
1338
  return ok(result);
1253
1339
  }
1340
+ case "sync_project": {
1341
+ const { syncProject: syncProject2 } = await Promise.resolve().then(() => (init_sync(), exports_sync));
1342
+ const dir = args["project_dir"] || process.cwd();
1343
+ const result = await syncProject2({ projectDir: dir });
1344
+ return ok(result);
1345
+ }
1254
1346
  case "render_template": {
1255
1347
  const { renderTemplate: renderTemplate2 } = await Promise.resolve().then(() => (init_template(), exports_template));
1256
1348
  const config = getConfig(args["id_or_slug"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/configs",
3
- "version": "0.2.20",
3
+ "version": "0.2.22",
4
4
  "description": "AI coding agent configuration manager — store, version, apply, and share all your AI coding configs. CLI + MCP + REST API + Dashboard.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",