@hasna/instructions 0.4.42 → 0.5.0

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 (45) hide show
  1. package/dist/cli/apply-unchanged-snapshot-bloat.test.d.ts +2 -0
  2. package/dist/cli/apply-unchanged-snapshot-bloat.test.d.ts.map +1 -0
  3. package/dist/cli/index.js +1179 -195
  4. package/dist/cli/station-profile.test.d.ts +2 -0
  5. package/dist/cli/station-profile.test.d.ts.map +1 -0
  6. package/dist/generated/storage-kit/backend.d.ts +0 -1
  7. package/dist/generated/storage-kit/backend.d.ts.map +1 -1
  8. package/dist/generated/storage-kit/index.d.ts +1 -1
  9. package/dist/generated/storage-kit/query.d.ts +1 -1
  10. package/dist/generated/storage-kit/query.d.ts.map +1 -1
  11. package/dist/index.d.ts +4 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +685 -196
  14. package/dist/lib/apply.d.ts.map +1 -1
  15. package/dist/lib/instruction-graph.d.ts +4 -0
  16. package/dist/lib/instruction-graph.d.ts.map +1 -1
  17. package/dist/lib/provider-context.d.ts +94 -0
  18. package/dist/lib/provider-context.d.ts.map +1 -0
  19. package/dist/lib/provider-context.test.d.ts +2 -0
  20. package/dist/lib/provider-context.test.d.ts.map +1 -0
  21. package/dist/lib/session-apply.d.ts +7 -0
  22. package/dist/lib/session-apply.d.ts.map +1 -1
  23. package/dist/lib/session-authority.d.ts +22 -2
  24. package/dist/lib/session-authority.d.ts.map +1 -1
  25. package/dist/lib/session-render.d.ts +9 -1
  26. package/dist/lib/session-render.d.ts.map +1 -1
  27. package/dist/lib/station-profile.d.ts +102 -0
  28. package/dist/lib/station-profile.d.ts.map +1 -0
  29. package/dist/lib/station-profile.test.d.ts +2 -0
  30. package/dist/lib/station-profile.test.d.ts.map +1 -0
  31. package/dist/lib/sync-dir.d.ts.map +1 -1
  32. package/dist/lib/sync.d.ts.map +1 -1
  33. package/dist/mcp/early-args.test.d.ts +2 -0
  34. package/dist/mcp/early-args.test.d.ts.map +1 -0
  35. package/dist/mcp/index.d.ts.map +1 -1
  36. package/dist/mcp/index.js +125 -76
  37. package/dist/mcp/server.d.ts.map +1 -1
  38. package/dist/server/cloud.d.ts.map +1 -1
  39. package/dist/server/early-args.test.d.ts +2 -0
  40. package/dist/server/early-args.test.d.ts.map +1 -0
  41. package/dist/server/index.d.ts.map +1 -1
  42. package/dist/server/index.js +38 -2
  43. package/dist/status.d.ts.map +1 -1
  44. package/dist/storage/cloud-store.d.ts.map +1 -1
  45. package/package.json +2 -2
package/dist/mcp/index.js CHANGED
@@ -99,17 +99,17 @@ var init_retired_storage_mode = __esm(() => {
99
99
 
100
100
  // src/lib/raw-store-root.ts
101
101
  import { homedir } from "os";
102
- import { join, resolve } from "path";
102
+ import { join as join2, resolve } from "path";
103
103
  function getRawStoreRoot() {
104
- return resolve(process.env[RAW_STORE_ROOT_ENV] || join(process.env["HOME"] || homedir(), ".hasna", "instructions"));
104
+ return resolve(process.env[RAW_STORE_ROOT_ENV] || join2(process.env["HOME"] || homedir(), ".hasna", "instructions"));
105
105
  }
106
106
  var RAW_STORE_ROOT_ENV = "HASNA_CONFIGS_HOME";
107
107
  var init_raw_store_root = () => {};
108
108
 
109
109
  // src/db/database.ts
110
110
  import { Database } from "bun:sqlite";
111
- import { existsSync, mkdirSync, rmSync } from "fs";
112
- import { join as join2 } from "path";
111
+ import { existsSync as existsSync2, mkdirSync, rmSync } from "fs";
112
+ import { join as join3 } from "path";
113
113
  import { randomUUID } from "crypto";
114
114
  function getDbPath() {
115
115
  if (process.env["HASNA_INSTRUCTIONS_DB_PATH"]) {
@@ -117,7 +117,7 @@ function getDbPath() {
117
117
  }
118
118
  const dir = getRawStoreRoot();
119
119
  mkdirSync(dir, { recursive: true });
120
- return join2(dir, "instructions.db");
120
+ return join3(dir, "instructions.db");
121
121
  }
122
122
  function uuid() {
123
123
  return randomUUID();
@@ -158,7 +158,7 @@ function resetLocalDatabase() {
158
158
  if (dbPath === ":memory:")
159
159
  return;
160
160
  for (const p of [dbPath, `${dbPath}-wal`, `${dbPath}-shm`]) {
161
- if (existsSync(p))
161
+ if (existsSync2(p))
162
162
  rmSync(p);
163
163
  }
164
164
  }
@@ -596,8 +596,8 @@ var init_template = __esm(() => {
596
596
 
597
597
  // src/lib/machine.ts
598
598
  import { arch as currentArch, homedir as homedir2, hostname as currentHostname, type as currentOsType } from "os";
599
- import { existsSync as existsSync2 } from "fs";
600
- import { join as join3 } from "path";
599
+ import { existsSync as existsSync3 } from "fs";
600
+ import { join as join4 } from "path";
601
601
  function normalizeOsFamily(os) {
602
602
  const value = (os ?? "").trim().toLowerCase();
603
603
  if (value === "darwin" || value === "macos" || value === "mac" || value === "osx")
@@ -612,8 +612,8 @@ function detectMachineContext(overrides = {}) {
612
612
  const homeDir = overrides.home_dir ?? process.env["CONFIGS_HOME"] ?? process.env["HOME"] ?? homedir2();
613
613
  const os = overrides.os ?? currentOsType();
614
614
  const osFamily = normalizeOsFamily(os);
615
- const bunBinDir = overrides.bun_bin_dir ?? join3(homeDir, ".bun", "bin");
616
- const defaultBunPath = osFamily === "macos" && existsSync2(BREW_BUN_PATH) ? BREW_BUN_PATH : join3(bunBinDir, "bun");
615
+ const bunBinDir = overrides.bun_bin_dir ?? join4(homeDir, ".bun", "bin");
616
+ const defaultBunPath = osFamily === "macos" && existsSync3(BREW_BUN_PATH) ? BREW_BUN_PATH : join4(bunBinDir, "bun");
617
617
  return {
618
618
  id: "current-machine",
619
619
  hostname: overrides.hostname ?? currentHostname(),
@@ -623,10 +623,10 @@ function detectMachineContext(overrides = {}) {
623
623
  created_at: "",
624
624
  os_family: osFamily,
625
625
  home_dir: homeDir,
626
- workspace_root: overrides.workspace_root ?? join3(homeDir, osFamily === "macos" ? "Workspace" : "workspace"),
626
+ workspace_root: overrides.workspace_root ?? join4(homeDir, osFamily === "macos" ? "Workspace" : "workspace"),
627
627
  bun_bin_dir: bunBinDir,
628
628
  bun_path: overrides.bun_path ?? defaultBunPath,
629
- path_prefix: overrides.path_prefix ?? (osFamily === "macos" ? `${join3("/opt", "homebrew", "bin")}:${bunBinDir}` : bunBinDir)
629
+ path_prefix: overrides.path_prefix ?? (osFamily === "macos" ? `${join4("/opt", "homebrew", "bin")}:${bunBinDir}` : bunBinDir)
630
630
  };
631
631
  }
632
632
  function machineContextToVariables(machine) {
@@ -5115,7 +5115,7 @@ var init_session_render_contract = __esm(() => {
5115
5115
  });
5116
5116
 
5117
5117
  // src/lib/project-context.ts
5118
- import { basename, dirname, isAbsolute, join as join4, parse, relative, resolve as resolve2 } from "path";
5118
+ import { basename, dirname as dirname2, isAbsolute, join as join5, parse, relative, resolve as resolve2 } from "path";
5119
5119
  function revisionKey(value) {
5120
5120
  const sequence = value.match(/^(?:rev-)?([0-9]+)$/);
5121
5121
  if (sequence)
@@ -5678,7 +5678,7 @@ var init_asset_plan = __esm(() => {
5678
5678
  // src/lib/cursor-authority.ts
5679
5679
  import { createHash } from "crypto";
5680
5680
  import { homedir as homedir3 } from "os";
5681
- import { join as join5, resolve as resolve3 } from "path";
5681
+ import { join as join6, resolve as resolve3 } from "path";
5682
5682
  function sha256(content) {
5683
5683
  return createHash("sha256").update(content).digest("hex");
5684
5684
  }
@@ -5686,7 +5686,7 @@ function homeDir() {
5686
5686
  return process.env["HOME"] || homedir3();
5687
5687
  }
5688
5688
  function isCursorGlobalAuthorityPath(path) {
5689
- return resolve3(path) === resolve3(join5(homeDir(), CURSOR_GLOBAL_AUTHORITY_RELATIVE_PATH));
5689
+ return resolve3(path) === resolve3(join6(homeDir(), CURSOR_GLOBAL_AUTHORITY_RELATIVE_PATH));
5690
5690
  }
5691
5691
  function stampCursorGlobalAuthorityMarker(content) {
5692
5692
  if (CURSOR_GLOBAL_AUTHORITY_MARKER_PATTERN.test(content))
@@ -6884,8 +6884,8 @@ var init_config_store = __esm(() => {
6884
6884
  });
6885
6885
 
6886
6886
  // src/lib/session-render-ownership.ts
6887
- import { existsSync as existsSync3, readFileSync, statSync } from "fs";
6888
- import { dirname as dirname2, join as join6, parse as parse2, relative as relative2, sep } from "path";
6887
+ import { existsSync as existsSync4, readFileSync as readFileSync2, statSync } from "fs";
6888
+ import { dirname as dirname3, join as join7, parse as parse2, relative as relative2, sep } from "path";
6889
6889
  function toSegments(absolutePath2) {
6890
6890
  return absolutePath2.replaceAll("\\", "/").split("/").filter(Boolean);
6891
6891
  }
@@ -6904,19 +6904,19 @@ function pathIsSessionRenderManagedDir(absolutePath2) {
6904
6904
  function readManifestRelativePaths(manifestPath) {
6905
6905
  let stats;
6906
6906
  try {
6907
- if (!existsSync3(manifestPath))
6907
+ if (!existsSync4(manifestPath))
6908
6908
  return null;
6909
6909
  stats = statSync(manifestPath);
6910
6910
  } catch {
6911
6911
  return null;
6912
6912
  }
6913
- const cached = manifestCache.get(manifestPath);
6914
- if (cached && cached.mtimeMs === stats.mtimeMs && cached.size === stats.size) {
6915
- return cached.relativePaths;
6913
+ const cached2 = manifestCache.get(manifestPath);
6914
+ if (cached2 && cached2.mtimeMs === stats.mtimeMs && cached2.size === stats.size) {
6915
+ return cached2.relativePaths;
6916
6916
  }
6917
6917
  let manifest;
6918
6918
  try {
6919
- manifest = JSON.parse(readFileSync(manifestPath, "utf-8"));
6919
+ manifest = JSON.parse(readFileSync2(manifestPath, "utf-8"));
6920
6920
  } catch {
6921
6921
  return null;
6922
6922
  }
@@ -6931,16 +6931,16 @@ function readManifestRelativePaths(manifestPath) {
6931
6931
  }
6932
6932
  function sessionRenderManifestClaimsPath(absolutePath2) {
6933
6933
  const root = parse2(absolutePath2).root;
6934
- let home = dirname2(absolutePath2);
6934
+ let home = dirname3(absolutePath2);
6935
6935
  for (let depth = 0;depth < MANIFEST_ANCESTOR_LIMIT; depth += 1) {
6936
- const manifestPath = join6(home, ...SESSION_RENDER_MANIFEST_RELATIVE_PATH.split("/"));
6936
+ const manifestPath = join7(home, ...SESSION_RENDER_MANIFEST_RELATIVE_PATH.split("/"));
6937
6937
  const relativePaths = readManifestRelativePaths(manifestPath);
6938
6938
  if (relativePaths) {
6939
6939
  const claimed = relative2(home, absolutePath2).split(sep).join("/");
6940
6940
  if (relativePaths.has(claimed))
6941
6941
  return true;
6942
6942
  }
6943
- const parent = dirname2(home);
6943
+ const parent = dirname3(home);
6944
6944
  if (parent === home || home === root)
6945
6945
  break;
6946
6946
  home = parent;
@@ -6968,8 +6968,8 @@ __export(exports_apply, {
6968
6968
  applyConfigs: () => applyConfigs,
6969
6969
  applyConfig: () => applyConfig
6970
6970
  });
6971
- import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync2, realpathSync, writeFileSync } from "fs";
6972
- import { basename as basename3, dirname as dirname3, join as join7, resolve as resolve4 } from "path";
6971
+ import { existsSync as existsSync5, mkdirSync as mkdirSync2, readFileSync as readFileSync3, realpathSync, writeFileSync } from "fs";
6972
+ import { basename as basename3, dirname as dirname4, join as join8, resolve as resolve4 } from "path";
6973
6973
  import { homedir as homedir4 } from "os";
6974
6974
  function getConfigHome() {
6975
6975
  return process.env["CONFIGS_HOME"] || process.env["HOME"] || homedir4();
@@ -6988,14 +6988,14 @@ function normalizeTargetPath(p) {
6988
6988
  let current = expanded;
6989
6989
  const missingSegments = [];
6990
6990
  while (true) {
6991
- if (existsSync4(current)) {
6991
+ if (existsSync5(current)) {
6992
6992
  try {
6993
6993
  return resolve4(realpathSync(current), ...missingSegments);
6994
6994
  } catch {
6995
6995
  return expanded;
6996
6996
  }
6997
6997
  }
6998
- const parent = dirname3(current);
6998
+ const parent = dirname4(current);
6999
6999
  const name = basename3(current);
7000
7000
  if (parent === current)
7001
7001
  return expanded;
@@ -7019,11 +7019,11 @@ async function writeConfigResult(config, targetPath, content, opts, meta = {}) {
7019
7019
  }
7020
7020
  const path = expandPath(renderedTargetPath);
7021
7021
  const renderedForTarget = isCursorGlobalAuthorityPath(path) ? stampCursorGlobalAuthorityMarker(renderedContent) : renderedContent;
7022
- const previousContent = existsSync4(path) ? readFileSync2(path, "utf-8") : null;
7022
+ const previousContent = existsSync5(path) ? readFileSync3(path, "utf-8") : null;
7023
7023
  const changed = previousContent !== renderedForTarget;
7024
7024
  if (!opts.dryRun) {
7025
- const dir = dirname3(path);
7026
- if (!existsSync4(dir)) {
7025
+ const dir = dirname4(path);
7026
+ if (!existsSync5(dir)) {
7027
7027
  mkdirSync2(dir, { recursive: true });
7028
7028
  }
7029
7029
  if (previousContent !== null && changed) {
@@ -7057,9 +7057,9 @@ function wouldDestroyACredential(targetPath, renderedContent, format) {
7057
7057
  let current;
7058
7058
  try {
7059
7059
  const path = expandPath(targetPath);
7060
- if (!existsSync4(path))
7060
+ if (!existsSync5(path))
7061
7061
  return [];
7062
- current = readFileSync2(path, "utf-8");
7062
+ current = readFileSync3(path, "utf-8");
7063
7063
  } catch {
7064
7064
  return secretTokens;
7065
7065
  }
@@ -7147,7 +7147,7 @@ async function applyPreparedConfig(config, opts) {
7147
7147
  changed: outputResults.some((output) => output.changed)
7148
7148
  };
7149
7149
  }
7150
- if (!opts.dryRun) {
7150
+ if (!opts.dryRun && result.changed) {
7151
7151
  await store.updateConfig(config.id, { synced_at: new Date().toISOString() });
7152
7152
  }
7153
7153
  return result;
@@ -7383,7 +7383,7 @@ function sessionRendererOwnsCanonicalTarget(normalized, opts) {
7383
7383
  getConfigHome(),
7384
7384
  opts.vars?.["HOME_DIR"]
7385
7385
  ].filter((home) => typeof home === "string" && home.length > 0));
7386
- if ([...homes].some((home) => SESSION_RENDER_OWNED_CONFIG_TARGETS.some((relativePath) => normalized === normalizeTargetPath(join7(home, ...relativePath.split("/"))))))
7386
+ if ([...homes].some((home) => SESSION_RENDER_OWNED_CONFIG_TARGETS.some((relativePath) => normalized === normalizeTargetPath(join8(home, ...relativePath.split("/"))))))
7387
7387
  return true;
7388
7388
  return sessionRenderOwnsPath(normalized);
7389
7389
  }
@@ -7416,8 +7416,8 @@ __export(exports_sync, {
7416
7416
  KNOWN_CONFIGS: () => KNOWN_CONFIGS,
7417
7417
  CLAUDE_PROMPT_OUTPUTS: () => CLAUDE_PROMPT_OUTPUTS
7418
7418
  });
7419
- import { existsSync as existsSync5, readdirSync, readFileSync as readFileSync3 } from "fs";
7420
- import { basename as basename4, extname as extname2, join as join8 } from "path";
7419
+ import { existsSync as existsSync6, readdirSync, readFileSync as readFileSync4 } from "fs";
7420
+ import { basename as basename4, extname as extname2, join as join9 } from "path";
7421
7421
  function claudeRuleOutputs(fileName) {
7422
7422
  const stem = basename4(fileName, extname2(fileName));
7423
7423
  return [
@@ -7456,7 +7456,7 @@ function isGeneratedOutputTarget2(config, owners) {
7456
7456
  return !!ownerIds && !ownerIds.has(config.id);
7457
7457
  }
7458
7458
  function hasClaudePromptSource() {
7459
- return existsSync5(expandPath("~/.claude/CLAUDE.md"));
7459
+ return existsSync6(expandPath("~/.claude/CLAUDE.md"));
7460
7460
  }
7461
7461
  function hasClaudeRuleSourceForCursorTarget(targetPath) {
7462
7462
  const absoluteTargetPath = expandPath(targetPath);
@@ -7464,7 +7464,7 @@ function hasClaudeRuleSourceForCursorTarget(targetPath) {
7464
7464
  if (!absoluteTargetPath.startsWith(`${absolutePrefix}/`) || !absoluteTargetPath.endsWith(".mdc"))
7465
7465
  return false;
7466
7466
  const stem = basename4(absoluteTargetPath, ".mdc");
7467
- return existsSync5(expandPath(`~/.claude/rules/${stem}.md`)) || existsSync5(expandPath(`~/.claude/rules/${stem}.mdc`));
7467
+ return existsSync6(expandPath(`~/.claude/rules/${stem}.md`)) || existsSync6(expandPath(`~/.claude/rules/${stem}.mdc`));
7468
7468
  }
7469
7469
  function isKnownGeneratedTargetPath(targetPath) {
7470
7470
  const normalizedTargetPath = normalizeTargetPath(targetPath);
@@ -7481,11 +7481,11 @@ async function syncProject(opts) {
7481
7481
  const allConfigs = await store.listConfigs();
7482
7482
  const machine = detectMachineContext();
7483
7483
  for (const pf of PROJECT_CONFIG_FILES) {
7484
- const abs = join8(absDir, pf.file);
7485
- if (!existsSync5(abs))
7484
+ const abs = join9(absDir, pf.file);
7485
+ if (!existsSync6(abs))
7486
7486
  continue;
7487
7487
  try {
7488
- const rawContent = readFileSync3(abs, "utf-8");
7488
+ const rawContent = readFileSync4(abs, "utf-8");
7489
7489
  if (rawContent.length > 500000) {
7490
7490
  result.skipped.push(pf.file);
7491
7491
  continue;
@@ -7514,20 +7514,20 @@ async function syncProject(opts) {
7514
7514
  }
7515
7515
  }
7516
7516
  for (const ruleDir of [
7517
- { dir: join8(absDir, ".claude", "rules"), agent: "claude", namePrefix: "rules" },
7518
- { dir: join8(absDir, ".agents", "rules"), agent: "antigravity", namePrefix: "antigravity-rules" },
7519
- { dir: join8(absDir, ".cursor", "rules"), agent: "cursor", namePrefix: "cursor-rules" },
7520
- { dir: join8(absDir, ".github", "instructions"), agent: "copilot", namePrefix: "copilot-instructions" },
7521
- { dir: join8(absDir, ".devin", "rules"), agent: "devin", namePrefix: "devin-rules" },
7522
- { dir: join8(absDir, ".windsurf", "rules"), agent: "windsurf-legacy", namePrefix: "windsurf-rules" },
7523
- { dir: join8(absDir, ".clinerules"), agent: "cline", namePrefix: "cline-rules" }
7517
+ { dir: join9(absDir, ".claude", "rules"), agent: "claude", namePrefix: "rules" },
7518
+ { dir: join9(absDir, ".agents", "rules"), agent: "antigravity", namePrefix: "antigravity-rules" },
7519
+ { dir: join9(absDir, ".cursor", "rules"), agent: "cursor", namePrefix: "cursor-rules" },
7520
+ { dir: join9(absDir, ".github", "instructions"), agent: "copilot", namePrefix: "copilot-instructions" },
7521
+ { dir: join9(absDir, ".devin", "rules"), agent: "devin", namePrefix: "devin-rules" },
7522
+ { dir: join9(absDir, ".windsurf", "rules"), agent: "windsurf-legacy", namePrefix: "windsurf-rules" },
7523
+ { dir: join9(absDir, ".clinerules"), agent: "cline", namePrefix: "cline-rules" }
7524
7524
  ]) {
7525
- if (!existsSync5(ruleDir.dir))
7525
+ if (!existsSync6(ruleDir.dir))
7526
7526
  continue;
7527
7527
  const mdFiles = readdirSync(ruleDir.dir).filter((f) => f.endsWith(".md") || f.endsWith(".mdc"));
7528
7528
  for (const f of mdFiles) {
7529
- const abs = join8(ruleDir.dir, f);
7530
- const raw = readFileSync3(abs, "utf-8");
7529
+ const abs = join9(ruleDir.dir, f);
7530
+ const raw = readFileSync4(abs, "utf-8");
7531
7531
  const redacted = redactContent(raw, "markdown");
7532
7532
  const machineAware = templateizeMachineContent(redacted.content, machine);
7533
7533
  const content = machineAware.content;
@@ -7566,20 +7566,20 @@ async function syncKnown(opts = {}) {
7566
7566
  for (const known of targets) {
7567
7567
  if (known.rulesDir) {
7568
7568
  const absDir = expandPath(known.rulesDir);
7569
- if (!existsSync5(absDir)) {
7569
+ if (!existsSync6(absDir)) {
7570
7570
  result.skipped.push(known.rulesDir);
7571
7571
  continue;
7572
7572
  }
7573
7573
  const extensions = known.rulesExtensions ?? [".md", ".mdc"];
7574
7574
  const ruleFiles = readdirSync(absDir).filter((f) => extensions.some((ext) => f.endsWith(ext)));
7575
7575
  for (const f of ruleFiles) {
7576
- const abs2 = join8(absDir, f);
7576
+ const abs2 = join9(absDir, f);
7577
7577
  const targetPath = abs2.replace(home, "~");
7578
7578
  if (existingOutputOwners.has(normalizeTargetPath(targetPath)) || isKnownGeneratedTargetPath(targetPath)) {
7579
7579
  result.skipped.push(`${targetPath} (generated output)`);
7580
7580
  continue;
7581
7581
  }
7582
- const raw = readFileSync3(abs2, "utf-8");
7582
+ const raw = readFileSync4(abs2, "utf-8");
7583
7583
  const redacted = redactContent(raw, "markdown");
7584
7584
  const machineAware = templateizeMachineContent(redacted.content, machine);
7585
7585
  const content = machineAware.content;
@@ -7607,18 +7607,18 @@ async function syncKnown(opts = {}) {
7607
7607
  continue;
7608
7608
  }
7609
7609
  const abs = expandPath(known.path);
7610
- if (!existsSync5(abs)) {
7610
+ if (!existsSync6(abs)) {
7611
7611
  result.skipped.push(known.path);
7612
7612
  continue;
7613
7613
  }
7614
7614
  try {
7615
- const rawContent = normalizeKnownConfigSource(known, readFileSync3(abs, "utf-8"));
7615
+ const rawContent = normalizeKnownConfigSource(known, readFileSync4(abs, "utf-8"));
7616
7616
  if (rawContent.length > 500000) {
7617
7617
  result.skipped.push(known.path + " (too large)");
7618
7618
  continue;
7619
7619
  }
7620
7620
  const fmt = known.format ?? detectFormat(abs);
7621
- const redacted = redactContent(rawContent, fmt);
7621
+ const redacted = redactContent(rawContent, redactFormatForTarget(abs, fmt));
7622
7622
  const machineAware = templateizeMachineContent(redacted.content, machine);
7623
7623
  const content = machineAware.content;
7624
7624
  const isTemplate2 = redacted.isTemplate || machineAware.changed;
@@ -7713,9 +7713,9 @@ function storedPlaceholderIsLiteralOnDisk(storedLine, diskLine) {
7713
7713
  }
7714
7714
  function buildDiff(expectedContent, targetPath, storedFormat, showSecrets) {
7715
7715
  const path = expandPath(targetPath);
7716
- if (!existsSync5(path))
7716
+ if (!existsSync6(path))
7717
7717
  return `(file not found on disk: ${path})`;
7718
- const diskContent = readFileSync3(path, "utf-8");
7718
+ const diskContent = readFileSync4(path, "utf-8");
7719
7719
  if (diskContent === expectedContent)
7720
7720
  return "(no diff \u2014 identical)";
7721
7721
  const format = redactFormatForTarget(targetPath, storedFormat);
@@ -7943,8 +7943,8 @@ var init_sync = __esm(() => {
7943
7943
  });
7944
7944
 
7945
7945
  // src/lib/sync-dir.ts
7946
- import { existsSync as existsSync6, readdirSync as readdirSync2, readFileSync as readFileSync4, statSync as statSync2 } from "fs";
7947
- import { join as join9, relative as relative3 } from "path";
7946
+ import { existsSync as existsSync7, readdirSync as readdirSync2, readFileSync as readFileSync5, statSync as statSync2 } from "fs";
7947
+ import { join as join10, relative as relative3 } from "path";
7948
7948
  import { homedir as homedir5 } from "os";
7949
7949
  function shouldSkip(p) {
7950
7950
  return SKIP.some((s) => p.includes(s));
@@ -7952,9 +7952,9 @@ function shouldSkip(p) {
7952
7952
  async function syncFromDir(dir, opts = {}) {
7953
7953
  const store = opts.store ?? resolveConfigStore();
7954
7954
  const absDir = expandPath(dir);
7955
- if (!existsSync6(absDir))
7955
+ if (!existsSync7(absDir))
7956
7956
  return { added: 0, updated: 0, unchanged: 0, skipped: [`Not found: ${absDir}`] };
7957
- const files = opts.recursive !== false ? walkDir(absDir) : readdirSync2(absDir).map((f) => join9(absDir, f)).filter((f) => statSync2(f).isFile());
7957
+ const files = opts.recursive !== false ? walkDir(absDir) : readdirSync2(absDir).map((f) => join10(absDir, f)).filter((f) => statSync2(f).isFile());
7958
7958
  const result = { added: 0, updated: 0, unchanged: 0, skipped: [] };
7959
7959
  const home = homedir5();
7960
7960
  const allConfigs = await store.listConfigs();
@@ -7964,20 +7964,21 @@ async function syncFromDir(dir, opts = {}) {
7964
7964
  continue;
7965
7965
  }
7966
7966
  try {
7967
- const content = readFileSync4(file, "utf-8");
7967
+ const content = readFileSync5(file, "utf-8");
7968
7968
  if (content.length > 500000) {
7969
7969
  result.skipped.push(file + " (too large)");
7970
7970
  continue;
7971
7971
  }
7972
7972
  const targetPath = file.replace(home, "~");
7973
+ const redacted = redactContent(content, redactFormatForTarget(targetPath, detectFormat(file)));
7973
7974
  const existing = allConfigs.find((c) => c.target_path === targetPath);
7974
7975
  if (!existing) {
7975
7976
  if (!opts.dryRun)
7976
- await store.createConfig({ name: relative3(absDir, file), category: detectCategory(file), agent: detectAgent(file), target_path: targetPath, format: detectFormat(file), content });
7977
+ await store.createConfig({ name: relative3(absDir, file), category: detectCategory(file), agent: detectAgent(file), target_path: targetPath, format: detectFormat(file), content: redacted.content });
7977
7978
  result.added++;
7978
- } else if (existing.content !== content) {
7979
+ } else if (existing.content !== redacted.content) {
7979
7980
  if (!opts.dryRun)
7980
- await store.updateConfig(existing.id, { content });
7981
+ await store.updateConfig(existing.id, { content: redacted.content });
7981
7982
  result.updated++;
7982
7983
  } else {
7983
7984
  result.unchanged++;
@@ -8014,7 +8015,7 @@ async function syncToDir(dir, opts = {}) {
8014
8015
  }
8015
8016
  function walkDir(dir, files = []) {
8016
8017
  for (const entry of readdirSync2(dir, { withFileTypes: true })) {
8017
- const full = join9(dir, entry.name);
8018
+ const full = join10(dir, entry.name);
8018
8019
  if (shouldSkip(full))
8019
8020
  continue;
8020
8021
  if (entry.isDirectory())
@@ -8029,6 +8030,7 @@ var init_sync_dir = __esm(() => {
8029
8030
  init_config_store();
8030
8031
  init_apply();
8031
8032
  init_sync();
8033
+ init_redact();
8032
8034
  SKIP = [".db", ".db-shm", ".db-wal", ".log", ".lock", ".DS_Store", "node_modules", ".git"];
8033
8035
  });
8034
8036
 
@@ -8036,7 +8038,7 @@ var init_sync_dir = __esm(() => {
8036
8038
  var require_package = __commonJS((exports, module) => {
8037
8039
  module.exports = {
8038
8040
  name: "@hasna/instructions",
8039
- version: "0.4.42",
8041
+ version: "0.5.0",
8040
8042
  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.",
8041
8043
  type: "module",
8042
8044
  main: "dist/index.js",
@@ -8112,7 +8114,7 @@ var require_package = __commonJS((exports, module) => {
8112
8114
  author: "Andrei Hasna <andrei@hasna.com>",
8113
8115
  license: "Apache-2.0",
8114
8116
  dependencies: {
8115
- "@hasna/contracts": "0.13.3",
8117
+ "@hasna/contracts": "0.14.0",
8116
8118
  "@hasna/events": "^0.1.16",
8117
8119
  "@modelcontextprotocol/sdk": "^1.12.1",
8118
8120
  chalk: "^5.4.1",
@@ -8136,6 +8138,35 @@ var require_package = __commonJS((exports, module) => {
8136
8138
  // src/mcp/index.ts
8137
8139
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
8138
8140
 
8141
+ // src/lib/package-version.ts
8142
+ import { existsSync, readFileSync } from "fs";
8143
+ import { dirname, join } from "path";
8144
+ import { fileURLToPath } from "url";
8145
+ var cached = null;
8146
+ function getPackageVersion() {
8147
+ if (cached)
8148
+ return cached;
8149
+ try {
8150
+ let dir = dirname(fileURLToPath(import.meta.url));
8151
+ for (let i = 0;i < 8; i++) {
8152
+ const pkgPath = join(dir, "package.json");
8153
+ if (existsSync(pkgPath)) {
8154
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
8155
+ if (pkg.name === "@hasna/instructions" && pkg.version) {
8156
+ cached = pkg.version;
8157
+ return cached;
8158
+ }
8159
+ }
8160
+ const parent = dirname(dir);
8161
+ if (parent === dir)
8162
+ break;
8163
+ dir = parent;
8164
+ }
8165
+ } catch {}
8166
+ cached = "0.0.0";
8167
+ return cached;
8168
+ }
8169
+
8139
8170
  // src/mcp/server.ts
8140
8171
  init_config_store();
8141
8172
  init_apply();
@@ -8374,7 +8405,7 @@ function buildServer() {
8374
8405
  const allConfigs = await store.listConfigs({ kind: "file" });
8375
8406
  const { existsSync: ex, readFileSync: rf } = await import("fs");
8376
8407
  const { expandPath: expandPath2 } = await Promise.resolve().then(() => (init_apply(), exports_apply));
8377
- const { redactContent: redactContent2 } = await Promise.resolve().then(() => (init_redact(), exports_redact));
8408
+ const { redactContent: redactContent2, redactFormatForTarget: redactFormatForTarget2 } = await Promise.resolve().then(() => (init_redact(), exports_redact));
8378
8409
  let drifted = 0, missing = 0, templates = 0;
8379
8410
  const driftedSlugs = [];
8380
8411
  for (const c of allConfigs) {
@@ -8388,7 +8419,7 @@ function buildServer() {
8388
8419
  continue;
8389
8420
  }
8390
8421
  const disk = rf(abs, "utf-8");
8391
- const { content: redactedDisk } = redactContent2(disk, c.format);
8422
+ const { content: redactedDisk } = redactContent2(disk, redactFormatForTarget2(c.target_path, c.format));
8392
8423
  if (redactedDisk !== c.content) {
8393
8424
  drifted++;
8394
8425
  driftedSlugs.push(c.slug);
@@ -8435,11 +8466,11 @@ function buildServer() {
8435
8466
  return ok({ rendered, config_id: config.id, slug: config.slug });
8436
8467
  }
8437
8468
  case "scan_secrets": {
8438
- const { scanSecrets: scanSecrets2, redactContent: redactContent2 } = await Promise.resolve().then(() => (init_redact(), exports_redact));
8469
+ const { scanSecrets: scanSecrets2, redactContent: redactContent2, redactFormatForTarget: redactFormatForTarget2 } = await Promise.resolve().then(() => (init_redact(), exports_redact));
8439
8470
  const configs = args["id_or_slug"] ? [await store.getConfig(args["id_or_slug"])] : await store.listConfigs({ kind: "file" });
8440
8471
  const findings = [];
8441
8472
  for (const c of configs) {
8442
- const fmt = c.format;
8473
+ const fmt = redactFormatForTarget2(c.target_path ?? "", c.format);
8443
8474
  const secrets = scanSecrets2(c.content, fmt);
8444
8475
  if (secrets.length > 0) {
8445
8476
  findings.push({ slug: c.slug, secrets: secrets.length, vars: secrets.map((s) => s.varName) });
@@ -8587,6 +8618,24 @@ async function startMcpHttpServer(port) {
8587
8618
  // src/mcp/index.ts
8588
8619
  async function main() {
8589
8620
  const argv = process.argv.slice(2);
8621
+ if (argv.includes("--version") || argv.includes("-V")) {
8622
+ console.log(getPackageVersion());
8623
+ return;
8624
+ }
8625
+ if (argv.includes("--help") || argv.includes("-h")) {
8626
+ console.log(`Usage: configs-mcp [options]
8627
+
8628
+ MCP server for @hasna/instructions (Streamable HTTP by default; --stdio to select stdio).
8629
+
8630
+ Options:
8631
+ -V, --version output the version number
8632
+ -h, --help display help for command
8633
+ --claude register with Claude Code (stdio, user scope)
8634
+ --http explicitly select Streamable HTTP transport
8635
+ --stdio explicitly select stdio transport
8636
+ --port <n> HTTP port (default: 8853)`);
8637
+ return;
8638
+ }
8590
8639
  if (argv.includes("--claude")) {
8591
8640
  const proc = Bun.spawn(["claude", "mcp", "add", "--transport", "stdio", "--scope", "user", "configs", "--", "configs-mcp"], { stdout: "inherit", stderr: "inherit" });
8592
8641
  await proc.exited;
@@ -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,CAyVpC"}
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 +1 @@
1
- {"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../src/server/cloud.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAgB,UAAU,EAAE,KAAK,cAAc,EAAE,WAAW,EAAwB,MAAM,uBAAuB,CAAC;AACzH,OAAO,EAAmC,KAAK,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAI1G,eAAO,MAAM,qBAAqB,iBAAiB,CAAC;AAEpD,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAQhG;AAED,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAO7F;AAED,wFAAwF;AACxF,wBAAgB,wBAAwB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAEtF;AA0BD,+EAA+E;AAC/E,wBAAgB,cAAc,IAAI,eAAe,CAEhD;AAkBD,wBAAgB,cAAc,IAAI,WAAW,CAI5C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,IAAI,cAAc,CAejD;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAUvD;AAQD,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAmB7F;AAED,iEAAiE;AACjE,wBAAsB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAIlD;AAED,4BAA4B;AAC5B,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAMhD"}
1
+ {"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../src/server/cloud.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAgB,UAAU,EAAE,KAAK,cAAc,EAAE,WAAW,EAAwB,MAAM,uBAAuB,CAAC;AACzH,OAAO,EAAmC,KAAK,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAI1G,eAAO,MAAM,qBAAqB,iBAAiB,CAAC;AAEpD,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAQhG;AAED,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAO7F;AAED,wFAAwF;AACxF,wBAAgB,wBAAwB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAEtF;AA0BD,+EAA+E;AAC/E,wBAAgB,cAAc,IAAI,eAAe,CAEhD;AAkBD,wBAAgB,cAAc,IAAI,WAAW,CAI5C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,IAAI,cAAc,CAejD;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkBvD;AAQD,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAmB7F;AAED,iEAAiE;AACjE,wBAAsB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAIlD;AAED,4BAA4B;AAC5B,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAMhD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=early-args.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"early-args.test.d.ts","sourceRoot":"","sources":["../../src/server/early-args.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;;AAiJA,wBAAgE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;;AAsKA,wBAAgE"}
@@ -2779,7 +2779,10 @@ async function ensureCloudSchema() {
2779
2779
  await client.execute(sql);
2780
2780
  }
2781
2781
  await getApiKeyStore().ensureSchema();
2782
- })();
2782
+ })().catch((e) => {
2783
+ schemaEnsured = null;
2784
+ throw e;
2785
+ });
2783
2786
  return schemaEnsured;
2784
2787
  }
2785
2788
  var honoMiddlewareCache = new Map;
@@ -2865,6 +2868,18 @@ function boundedReadPage(items, total, options = {}) {
2865
2868
  };
2866
2869
  }
2867
2870
 
2871
+ // src/lib/machine.ts
2872
+ function normalizeOsFamily(os) {
2873
+ const value = (os ?? "").trim().toLowerCase();
2874
+ if (value === "darwin" || value === "macos" || value === "mac" || value === "osx")
2875
+ return "macos";
2876
+ if (value === "linux")
2877
+ return "linux";
2878
+ if (value === "windows_nt" || value === "windows" || value === "win32")
2879
+ return "windows";
2880
+ return value || "unknown";
2881
+ }
2882
+
2868
2883
  // src/lib/provider-version.ts
2869
2884
  function providerVersionSatisfies(version, range) {
2870
2885
  const current = parseProviderVersion(version);
@@ -8161,6 +8176,7 @@ async function resolveProfileForMachineRead2(client, machine, options = {}) {
8161
8176
  const { limit } = normalizeBoundedReadOptions(options);
8162
8177
  const host = (machine.hostname ?? "").trim().toLowerCase();
8163
8178
  const os = (machine.os ?? "").trim().toLowerCase();
8179
+ const osFamily = normalizeOsFamily(machine.os);
8164
8180
  const arch = (machine.arch ?? "").trim().toLowerCase();
8165
8181
  let cursor = 0;
8166
8182
  let scanned = 0;
@@ -8174,7 +8190,10 @@ async function resolveProfileForMachineRead2(client, machine, options = {}) {
8174
8190
  if (!profileHasSelectors(p.selectors))
8175
8191
  continue;
8176
8192
  const s = p.selectors;
8177
- const osOk = !s.os?.length || s.os.some((c) => c.trim().toLowerCase() === os);
8193
+ const osOk = !s.os?.length || s.os.some((c) => {
8194
+ const value = c.trim().toLowerCase();
8195
+ return value === os || normalizeOsFamily(c) === osFamily;
8196
+ });
8178
8197
  const archOk = !s.arch?.length || s.arch.some((c) => c.trim().toLowerCase() === arch);
8179
8198
  const hostOk = !s.hostnames?.length || s.hostnames.some((c) => c.trim().toLowerCase() === host);
8180
8199
  if (!osOk || !archOk || !hostOk)
@@ -9108,6 +9127,23 @@ if (process.argv.includes("--version") || process.argv.includes("-V")) {
9108
9127
  console.log(getPackageVersion());
9109
9128
  process.exit(0);
9110
9129
  }
9130
+ if (process.argv.includes("--help") || process.argv.includes("-h")) {
9131
+ console.log(`Usage: instructions-serve [options]
9132
+
9133
+ HTTP API server for @hasna/instructions (backend: sqlite or postgresql).
9134
+
9135
+ Options:
9136
+ -V, --version output the version number
9137
+ -h, --help display help for command
9138
+ migrate apply the schema migration to the configured database and exit
9139
+
9140
+ Environment:
9141
+ PORT / INSTRUCTIONS_PORT HTTP port (default: 3457)
9142
+ HOST / INSTRUCTIONS_HOST bind host (default: localhost)
9143
+ HASNA_INSTRUCTIONS_DATABASE_URL / INSTRUCTIONS_DATABASE_URL / DATABASE_URL
9144
+ postgresql backend URL (enables the cloud backend)`);
9145
+ process.exit(0);
9146
+ }
9111
9147
  var PORT = Number(process.env["PORT"] ?? process.env["INSTRUCTIONS_PORT"] ?? 3457);
9112
9148
  var app = new Hono2;
9113
9149
  app.use("*", cors());
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAW9E,KAAK,WAAW,GAAG,4BAA4B,GAAG,IAAI,CAAC;AACvD,KAAK,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC;AACtC,KAAK,cAAc,GAAG,IAAI,GAAG,MAAM,CAAC;AAEpC,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,SAAS,CAAC;IACnB,aAAa,EAAE,KAAK,CAAC;IACrB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,E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