vault-cortex 0.4.1 → 0.4.2

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/messages.js +29 -10
  2. package/package.json +1 -1
package/dist/messages.js CHANGED
@@ -1,12 +1,15 @@
1
1
  import { styleText } from "node:util";
2
- // Strip styling when stdout isn't a color TTY (piped output, NO_COLOR, CI) so
2
+ // Strip styling when stdout isn't a color TTY (piped output, CI) or NO_COLOR
3
+ // is set (any value, including empty — per the NO_COLOR spec) so
3
4
  // captured/redirected output stays plain — no stray escape codes in copied
4
5
  // commands or logs.
5
- const paint = (style, text) => process.stdout.isTTY && !process.env.NO_COLOR ? styleText(style, text) : text;
6
- // Section header that replaces the old clack note box: a bold title over a
7
- // dim rule. The rule is its own line (not a per-line prefix), so it never
8
- // touches a copyable command.
9
- const connectHeader = () => `${paint("bold", "Connect")}\n${paint("dim", "─".repeat(56))}`;
6
+ const paint = (style, text) => process.stdout.isTTY && !("NO_COLOR" in process.env)
7
+ ? styleText(style, text)
8
+ : text;
9
+ const RULE_WIDTH = 56;
10
+ const topRule = (label) => paint("dim", `╭── ${label} ${"─".repeat(Math.max(0, RULE_WIDTH - label.length - 6))}╮`);
11
+ const bottomRule = () => paint("dim", `╰${"─".repeat(RULE_WIDTH - 2)}╯`);
12
+ const sectionRule = (label) => paint("dim", `── ${label} ${"─".repeat(Math.max(0, RULE_WIDTH - label.length - 4))}`);
10
13
  const composeUpCommand = (targetDir) => `cd ${targetDir} && docker compose up -d`;
11
14
  const startServerLine = (targetDir) => `Start the server:\n ${composeUpCommand(targetDir)}`;
12
15
  /** Remote start line: running, blocked on the missing sync token, or ready to start. */
@@ -75,10 +78,12 @@ export const buildLocalConnectMessage = (params) => {
75
78
  // that claude.ai can't reach localhost at all and Claude Desktop needs the
76
79
  // mcp-remote bridge (the dialog rejects http, but mcp-remote exempts
77
80
  // localhost, so no --allow-http).
78
- const connectMessage = `${connectHeader()}
81
+ const connectMessage = `${topRule("Connect")}
79
82
 
80
83
  ${startLine}
81
84
 
85
+ ${sectionRule("MCP client")}
86
+
82
87
  ${connectUrlBlock(`${baseUrl}/mcp`, tokenLine)}
83
88
 
84
89
  ${connectGuidance(`${baseUrl}/mcp`)}
@@ -93,15 +98,21 @@ it with mcp-remote:
93
98
  "--header", "Authorization: Bearer <token above>"]
94
99
  }
95
100
 
101
+ ${sectionRule("Non-OAuth")}
102
+
96
103
  ${curlGuidance(`${baseUrl}/mcp`)}
97
104
 
98
105
  ${smokeTest(`${baseUrl}/healthz`)}
99
106
 
107
+ ${sectionRule("Settings")}
108
+
100
109
  Optional settings (timezone, memory folder, port, logging) are commented
101
110
  out in ${targetDir}/.env — uncomment, set a value, then apply with
102
111
  "docker compose up -d" (restart alone does not re-read .env).
103
112
 
104
- Full docs: https://github.com/aliasunder/vault-cortex/blob/main/deploy/local/README.md`;
113
+ Full docs: https://github.com/aliasunder/vault-cortex/blob/main/deploy/local/README.md
114
+
115
+ ${bottomRule()}`;
105
116
  return connectMessage;
106
117
  };
107
118
  /**
@@ -135,24 +146,32 @@ Claude Desktop only accept https URLs — set up HTTPS for those clients
135
146
  (see the HTTPS section in the remote guide).`;
136
147
  // Flush-left on purpose: this is printed as plain text (see paint), so
137
148
  // leading whitespace would render as literal indentation.
138
- const connectMessage = `${connectHeader()}
149
+ const connectMessage = `${topRule("Connect")}
139
150
 
140
151
  ${startLine}
141
152
 
153
+ ${sectionRule("MCP client")}
154
+
142
155
  ${connectUrlBlock(`${publicUrl}/mcp`, tokenLine)}
143
156
 
144
157
  ${clientGuidance}
145
158
 
159
+ ${sectionRule("Non-OAuth")}
160
+
146
161
  ${curlGuidance(`${publicUrl}/mcp`)}
147
162
 
148
163
  ${smokeTest(`${publicUrl}/healthz`)}
149
164
 
165
+ ${sectionRule("Settings")}
166
+
150
167
  Optional settings (timezone, memory folder, port, logging, sync
151
168
  behavior) are commented out in ${targetDir}/.env — uncomment, set a
152
169
  value, then apply with "docker compose up -d" (restart alone does not
153
170
  re-read .env).
154
171
 
155
172
  For HTTPS options (API Gateway, Caddy, Cloudflare Tunnel), see:
156
- https://github.com/aliasunder/vault-cortex/blob/main/deploy/remote/README.md#https-access`;
173
+ https://github.com/aliasunder/vault-cortex/blob/main/deploy/remote/README.md#https-access
174
+
175
+ ${bottomRule()}`;
157
176
  return connectMessage;
158
177
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vault-cortex",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Set up a Vault Cortex MCP server for your Obsidian vault in one command: npx vault-cortex init",
5
5
  "license": "MIT",
6
6
  "type": "module",