@virsanghavi/axis-server 1.0.2 → 1.0.4
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/bin/cli.ts +8 -8
- package/dist/cli.js +4 -4
- package/dist/mcp-server.mjs +8 -6
- package/package.json +1 -1
package/bin/cli.ts
CHANGED
|
@@ -17,7 +17,7 @@ program
|
|
|
17
17
|
.version("1.0.0");
|
|
18
18
|
|
|
19
19
|
program.action(() => {
|
|
20
|
-
console.
|
|
20
|
+
console.error(chalk.bold.blue("Axis MCP Server Starting..."));
|
|
21
21
|
|
|
22
22
|
// Locate the bundled server script
|
|
23
23
|
const serverScript = path.resolve(__dirname, "../dist/mcp-server.mjs");
|
|
@@ -29,22 +29,22 @@ program.action(() => {
|
|
|
29
29
|
process.exit(1);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
console.
|
|
33
|
-
|
|
32
|
+
console.error(chalk.gray(`Launching server context...`));
|
|
33
|
+
|
|
34
34
|
// Pass through all arguments from the CLI to the underlying server
|
|
35
35
|
const args = [serverScript, ...process.argv.slice(2)];
|
|
36
36
|
|
|
37
37
|
// Spawn the node process with the bundled script
|
|
38
|
-
const proc = spawn("node", args, {
|
|
38
|
+
const proc = spawn("node", args, {
|
|
39
39
|
stdio: "inherit",
|
|
40
|
-
env: { ...process.env, FORCE_COLOR: '1' }
|
|
40
|
+
env: { ...process.env, FORCE_COLOR: '1' }
|
|
41
41
|
});
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
proc.on("close", (code) => {
|
|
44
44
|
if (code !== 0) {
|
|
45
|
-
console.
|
|
45
|
+
console.error(chalk.red(`Server process exited with code ${code}`));
|
|
46
46
|
} else {
|
|
47
|
-
console.
|
|
47
|
+
console.error(chalk.green("Server stopped gracefully."));
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
package/dist/cli.js
CHANGED
|
@@ -38,7 +38,7 @@ var __filename2 = (0, import_url.fileURLToPath)(importMetaUrl);
|
|
|
38
38
|
var __dirname = import_path.default.dirname(__filename2);
|
|
39
39
|
import_commander.program.name("axis-server").description("Start the Axis Shared Context MCP Server").version("1.0.0");
|
|
40
40
|
import_commander.program.action(() => {
|
|
41
|
-
console.
|
|
41
|
+
console.error(import_chalk.default.bold.blue("Axis MCP Server Starting..."));
|
|
42
42
|
const serverScript = import_path.default.resolve(__dirname, "../dist/mcp-server.mjs");
|
|
43
43
|
if (!import_fs.default.existsSync(serverScript)) {
|
|
44
44
|
console.error(import_chalk.default.red("Error: Server script not found."));
|
|
@@ -46,7 +46,7 @@ import_commander.program.action(() => {
|
|
|
46
46
|
console.error(import_chalk.default.gray("Did you run 'npm run build'?"));
|
|
47
47
|
process.exit(1);
|
|
48
48
|
}
|
|
49
|
-
console.
|
|
49
|
+
console.error(import_chalk.default.gray(`Launching server context...`));
|
|
50
50
|
const args = [serverScript, ...process.argv.slice(2)];
|
|
51
51
|
const proc = (0, import_child_process.spawn)("node", args, {
|
|
52
52
|
stdio: "inherit",
|
|
@@ -54,9 +54,9 @@ import_commander.program.action(() => {
|
|
|
54
54
|
});
|
|
55
55
|
proc.on("close", (code) => {
|
|
56
56
|
if (code !== 0) {
|
|
57
|
-
console.
|
|
57
|
+
console.error(import_chalk.default.red(`Server process exited with code ${code}`));
|
|
58
58
|
} else {
|
|
59
|
-
console.
|
|
59
|
+
console.error(import_chalk.default.green("Server stopped gracefully."));
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
process.on("SIGINT", () => {
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -169,7 +169,7 @@ var Logger = class {
|
|
|
169
169
|
}
|
|
170
170
|
log(level, message, meta) {
|
|
171
171
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
172
|
-
console.
|
|
172
|
+
console.error(JSON.stringify({
|
|
173
173
|
timestamp,
|
|
174
174
|
level,
|
|
175
175
|
message,
|
|
@@ -222,10 +222,13 @@ var NerveCenter = class {
|
|
|
222
222
|
const supabaseUrl = options.supabaseUrl || process.env.NEXT_PUBLIC_SUPABASE_URL;
|
|
223
223
|
const supabaseKey = options.supabaseServiceRoleKey || process.env.SUPABASE_SERVICE_ROLE_KEY;
|
|
224
224
|
if (!supabaseUrl || !supabaseKey) {
|
|
225
|
-
|
|
225
|
+
logger.warn("Supabase credentials missing. Running in local-only mode (state will be ephemeral or file-based).");
|
|
226
|
+
this.supabase = void 0;
|
|
227
|
+
this.useSupabase = false;
|
|
228
|
+
} else {
|
|
229
|
+
this.supabase = createClient(supabaseUrl, supabaseKey);
|
|
230
|
+
this.useSupabase = true;
|
|
226
231
|
}
|
|
227
|
-
this.supabase = createClient(supabaseUrl, supabaseKey);
|
|
228
|
-
this.useSupabase = true;
|
|
229
232
|
this.state = {
|
|
230
233
|
locks: {},
|
|
231
234
|
jobs: {},
|
|
@@ -744,8 +747,7 @@ var RagEngine = class {
|
|
|
744
747
|
// ../../src/local/mcp-server.ts
|
|
745
748
|
dotenv2.config({ path: ".env.local" });
|
|
746
749
|
if (!process.env.NEXT_PUBLIC_SUPABASE_URL || !process.env.SUPABASE_SERVICE_ROLE_KEY) {
|
|
747
|
-
logger.
|
|
748
|
-
process.exit(1);
|
|
750
|
+
logger.warn("Supabase credentials missing. RAG & Persistence disabled. Running in local/ephemeral mode.");
|
|
749
751
|
}
|
|
750
752
|
var manager = new ContextManager(
|
|
751
753
|
process.env.SHARED_CONTEXT_API_URL || "https://aicontext.vercel.app/api/v1",
|