@virsanghavi/axis-server 1.0.5 → 1.0.6

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-server.mjs +31 -26
  2. package/package.json +1 -1
@@ -772,35 +772,40 @@ if (process.env.NEXT_PUBLIC_SUPABASE_URL && process.env.SUPABASE_SERVICE_ROLE_KE
772
772
  );
773
773
  }
774
774
  async function ensureFileSystem() {
775
- const fs3 = await import("fs/promises");
776
- const path3 = await import("path");
777
- const fsSync = await import("fs");
778
- const cwd = process.cwd();
779
- const historyDir = path3.join(cwd, "history");
780
- await fs3.mkdir(historyDir, { recursive: true }).catch(() => {
781
- });
782
- const axisDir = path3.join(cwd, ".axis");
783
- const axisInstructions = path3.join(axisDir, "instructions");
784
- const legacyInstructions = path3.join(cwd, "agent-instructions");
785
- if (fsSync.existsSync(legacyInstructions) && !fsSync.existsSync(axisDir)) {
786
- logger.info("Using legacy agent-instructions directory");
787
- } else {
788
- await fs3.mkdir(axisInstructions, { recursive: true }).catch(() => {
775
+ try {
776
+ const fs3 = await import("fs/promises");
777
+ const path3 = await import("path");
778
+ const fsSync = await import("fs");
779
+ const cwd = process.cwd();
780
+ logger.info(`Server CWD: ${cwd}`);
781
+ const historyDir = path3.join(cwd, "history");
782
+ await fs3.mkdir(historyDir, { recursive: true }).catch(() => {
789
783
  });
790
- const defaults = [
791
- ["context.md", "# Project Context\n\n"],
792
- ["conventions.md", "# Coding Conventions\n\n"],
793
- ["activity.md", "# Activity Log\n\n"]
794
- ];
795
- for (const [file, content] of defaults) {
796
- const p = path3.join(axisInstructions, file);
797
- try {
798
- await fs3.access(p);
799
- } catch {
800
- await fs3.writeFile(p, content);
801
- logger.info(`Created default context file: ${file}`);
784
+ const axisDir = path3.join(cwd, ".axis");
785
+ const axisInstructions = path3.join(axisDir, "instructions");
786
+ const legacyInstructions = path3.join(cwd, "agent-instructions");
787
+ if (fsSync.existsSync(legacyInstructions) && !fsSync.existsSync(axisDir)) {
788
+ logger.info("Using legacy agent-instructions directory");
789
+ } else {
790
+ await fs3.mkdir(axisInstructions, { recursive: true }).catch(() => {
791
+ });
792
+ const defaults = [
793
+ ["context.md", "# Project Context\n\n"],
794
+ ["conventions.md", "# Coding Conventions\n\n"],
795
+ ["activity.md", "# Activity Log\n\n"]
796
+ ];
797
+ for (const [file, content] of defaults) {
798
+ const p = path3.join(axisInstructions, file);
799
+ try {
800
+ await fs3.access(p);
801
+ } catch {
802
+ await fs3.writeFile(p, content);
803
+ logger.info(`Created default context file: ${file}`);
804
+ }
802
805
  }
803
806
  }
807
+ } catch (error) {
808
+ logger.warn("Could not initialize local file system. Persistence features (context.md) may be disabled.", { error: String(error) });
804
809
  }
805
810
  }
806
811
  var server = new Server(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virsanghavi/axis-server",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Axis MCP Server CLI",
5
5
  "main": "dist/index.js",
6
6
  "bin": {