superlore-cli 0.7.0 → 0.7.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.
package/dist/config.d.ts CHANGED
@@ -35,6 +35,12 @@ interface SuperloreMcpConfig {
35
35
  /** Route the MCP is served at. Defaults to {@link DEFAULT_MCP_PATH}. */
36
36
  path?: string;
37
37
  }
38
+ /** A navbar logo — light/dark image paths + an optional home link, the mint.json way. */
39
+ interface SuperloreLogo {
40
+ light?: string;
41
+ dark?: string;
42
+ href?: string;
43
+ }
38
44
  /** The parsed, validated shape of a `superlore.json` file. */
39
45
  interface SuperloreJson {
40
46
  /** Human-facing KB name. */
@@ -43,6 +49,12 @@ interface SuperloreJson {
43
49
  type: SuperloreType;
44
50
  /** Brand accent — any CSS colour. superlore derives the rest of the family (light + dark). */
45
51
  accent?: string;
52
+ /** Visual theme skin: "default" | "mint" (loose — forward-compatible with future skins). */
53
+ theme?: string;
54
+ /** Navbar logo — light/dark images + home link (mint.json-style). */
55
+ logo?: SuperloreLogo;
56
+ /** Favicon path (svg / png / ico). */
57
+ favicon?: string;
46
58
  /** The human gate. Omitted ⇒ public. */
47
59
  auth?: SuperloreAuthConfig;
48
60
  /** The agent surface. Omitted ⇒ MCP enabled at the default path. */
@@ -84,4 +96,4 @@ declare function serializeSuperloreJson(config: SuperloreJson): string;
84
96
  /** Resolve the MCP path for a config, falling back to the default when enabled and unset. */
85
97
  declare function resolveMcpPath(config: SuperloreJson): string | undefined;
86
98
 
87
- export { DEFAULT_MCP_PATH, SUPERLORE_JSON_FILENAME, SUPERLORE_TYPES, type SuperloreAuthConfig, type SuperloreAuthProvider, type SuperloreJson, type SuperloreJsonIssue, type SuperloreJsonResult, type SuperloreMcpConfig, type SuperloreType, parseSuperloreJson, resolveMcpPath, serializeSuperloreJson, validateSuperloreJson };
99
+ export { DEFAULT_MCP_PATH, SUPERLORE_JSON_FILENAME, SUPERLORE_TYPES, type SuperloreAuthConfig, type SuperloreAuthProvider, type SuperloreJson, type SuperloreJsonIssue, type SuperloreJsonResult, type SuperloreLogo, type SuperloreMcpConfig, type SuperloreType, parseSuperloreJson, resolveMcpPath, serializeSuperloreJson, validateSuperloreJson };
package/dist/config.js CHANGED
@@ -29,6 +29,32 @@ function validateSuperloreJson(input) {
29
29
  if (accent !== void 0 && (typeof accent !== "string" || accent.trim().length === 0)) {
30
30
  issues.push({ path: "accent", message: "must be a non-empty string (a CSS colour)" });
31
31
  }
32
+ const theme = input.theme;
33
+ if (theme !== void 0 && (typeof theme !== "string" || theme.trim().length === 0)) {
34
+ issues.push({ path: "theme", message: "must be a non-empty string" });
35
+ }
36
+ const favicon = input.favicon;
37
+ if (favicon !== void 0 && (typeof favicon !== "string" || favicon.trim().length === 0)) {
38
+ issues.push({ path: "favicon", message: "must be a non-empty string (a path or URL)" });
39
+ }
40
+ let logo;
41
+ if (input.logo !== void 0) {
42
+ if (!isRecord(input.logo)) {
43
+ issues.push({ path: "logo", message: "must be an object" });
44
+ } else {
45
+ const l = input.logo;
46
+ for (const k of ["light", "dark", "href"]) {
47
+ if (l[k] !== void 0 && (typeof l[k] !== "string" || l[k].trim().length === 0)) {
48
+ issues.push({ path: `logo.${k}`, message: "must be a non-empty string" });
49
+ }
50
+ }
51
+ logo = {
52
+ light: typeof l.light === "string" ? l.light : void 0,
53
+ dark: typeof l.dark === "string" ? l.dark : void 0,
54
+ href: typeof l.href === "string" ? l.href : void 0
55
+ };
56
+ }
57
+ }
32
58
  let auth;
33
59
  if (input.auth !== void 0) {
34
60
  if (!isRecord(input.auth)) {
@@ -82,6 +108,9 @@ function validateSuperloreJson(input) {
82
108
  type
83
109
  };
84
110
  if (typeof accent === "string") value.accent = accent.trim();
111
+ if (typeof theme === "string") value.theme = theme.trim();
112
+ if (typeof favicon === "string") value.favicon = favicon.trim();
113
+ if (logo && (logo.light || logo.dark || logo.href)) value.logo = logo;
85
114
  if (auth) value.auth = auth;
86
115
  if (mcp) value.mcp = mcp;
87
116
  return { ok: true, value };
package/dist/index.d.ts CHANGED
@@ -37,6 +37,12 @@ interface SuperloreMcpConfig {
37
37
  /** Route the MCP is served at. Defaults to {@link DEFAULT_MCP_PATH}. */
38
38
  path?: string;
39
39
  }
40
+ /** A navbar logo — light/dark image paths + an optional home link, the mint.json way. */
41
+ interface SuperloreLogo {
42
+ light?: string;
43
+ dark?: string;
44
+ href?: string;
45
+ }
40
46
  /** The parsed, validated shape of a `superlore.json` file. */
41
47
  interface SuperloreJson {
42
48
  /** Human-facing KB name. */
@@ -45,6 +51,12 @@ interface SuperloreJson {
45
51
  type: SuperloreType;
46
52
  /** Brand accent — any CSS colour. superlore derives the rest of the family (light + dark). */
47
53
  accent?: string;
54
+ /** Visual theme skin: "default" | "mint" (loose — forward-compatible with future skins). */
55
+ theme?: string;
56
+ /** Navbar logo — light/dark images + home link (mint.json-style). */
57
+ logo?: SuperloreLogo;
58
+ /** Favicon path (svg / png / ico). */
59
+ favicon?: string;
48
60
  /** The human gate. Omitted ⇒ public. */
49
61
  auth?: SuperloreAuthConfig;
50
62
  /** The agent surface. Omitted ⇒ MCP enabled at the default path. */
@@ -87,10 +99,10 @@ declare function serializeSuperloreJson(config: SuperloreJson): string;
87
99
  declare function resolveMcpPath(config: SuperloreJson): string | undefined;
88
100
 
89
101
  /** The CLI version, kept in sync with package.json at build time. */
90
- declare const VERSION = "0.7.0";
102
+ declare const VERSION = "0.7.2";
91
103
  /** Build the argument parser. Exported for tests; `run()` wires it to argv. */
92
104
  declare function buildCli(argv?: readonly string[]): cac.CAC;
93
105
  /** Parse argv and dispatch. Reports unknown commands and unexpected errors cleanly. */
94
106
  declare function run(argv?: readonly string[]): Promise<void>;
95
107
 
96
- export { DEFAULT_MCP_PATH, SUPERLORE_JSON_FILENAME, SUPERLORE_TYPES, type SuperloreAuthConfig, type SuperloreAuthProvider, type SuperloreJson, type SuperloreJsonIssue, type SuperloreJsonResult, type SuperloreMcpConfig, type SuperloreType, VERSION, buildCli, parseSuperloreJson, resolveMcpPath, run, serializeSuperloreJson, validateSuperloreJson };
108
+ export { DEFAULT_MCP_PATH, SUPERLORE_JSON_FILENAME, SUPERLORE_TYPES, type SuperloreAuthConfig, type SuperloreAuthProvider, type SuperloreJson, type SuperloreJsonIssue, type SuperloreJsonResult, type SuperloreLogo, type SuperloreMcpConfig, type SuperloreType, VERSION, buildCli, parseSuperloreJson, resolveMcpPath, run, serializeSuperloreJson, validateSuperloreJson };
package/dist/index.js CHANGED
@@ -100,6 +100,32 @@ function validateSuperloreJson(input) {
100
100
  if (accent2 !== void 0 && (typeof accent2 !== "string" || accent2.trim().length === 0)) {
101
101
  issues.push({ path: "accent", message: "must be a non-empty string (a CSS colour)" });
102
102
  }
103
+ const theme = input.theme;
104
+ if (theme !== void 0 && (typeof theme !== "string" || theme.trim().length === 0)) {
105
+ issues.push({ path: "theme", message: "must be a non-empty string" });
106
+ }
107
+ const favicon = input.favicon;
108
+ if (favicon !== void 0 && (typeof favicon !== "string" || favicon.trim().length === 0)) {
109
+ issues.push({ path: "favicon", message: "must be a non-empty string (a path or URL)" });
110
+ }
111
+ let logo;
112
+ if (input.logo !== void 0) {
113
+ if (!isRecord(input.logo)) {
114
+ issues.push({ path: "logo", message: "must be an object" });
115
+ } else {
116
+ const l = input.logo;
117
+ for (const k of ["light", "dark", "href"]) {
118
+ if (l[k] !== void 0 && (typeof l[k] !== "string" || l[k].trim().length === 0)) {
119
+ issues.push({ path: `logo.${k}`, message: "must be a non-empty string" });
120
+ }
121
+ }
122
+ logo = {
123
+ light: typeof l.light === "string" ? l.light : void 0,
124
+ dark: typeof l.dark === "string" ? l.dark : void 0,
125
+ href: typeof l.href === "string" ? l.href : void 0
126
+ };
127
+ }
128
+ }
103
129
  let auth;
104
130
  if (input.auth !== void 0) {
105
131
  if (!isRecord(input.auth)) {
@@ -153,6 +179,9 @@ function validateSuperloreJson(input) {
153
179
  type
154
180
  };
155
181
  if (typeof accent2 === "string") value.accent = accent2.trim();
182
+ if (typeof theme === "string") value.theme = theme.trim();
183
+ if (typeof favicon === "string") value.favicon = favicon.trim();
184
+ if (logo && (logo.light || logo.dark || logo.href)) value.logo = logo;
156
185
  if (auth) value.auth = auth;
157
186
  if (mcp) value.mcp = mcp;
158
187
  return { ok: true, value };
@@ -266,9 +295,14 @@ import { homedir, tmpdir } from "os";
266
295
  import { join as join2 } from "path";
267
296
  import process2 from "process";
268
297
  var EXTENSION_ID = "superlore.superlore-preview";
269
- var DEFAULT_VSIX_URL = "https://superlore.vercel.app/superlore-preview.vsix";
270
- async function downloadVsix(url = DEFAULT_VSIX_URL) {
271
- const res = await fetch(url, { redirect: "follow" });
298
+ var OPENVSX_LATEST_API = "https://open-vsx.org/api/superlore/superlore-preview/latest";
299
+ async function downloadVsix(metaUrl = OPENVSX_LATEST_API) {
300
+ const meta = await fetch(metaUrl, { redirect: "follow" });
301
+ if (!meta.ok) throw new Error(`couldn't reach Open VSX (${meta.status} ${meta.statusText})`);
302
+ const info = await meta.json();
303
+ const download = info.files?.download;
304
+ if (!download) throw new Error("Open VSX returned no download URL for the extension");
305
+ const res = await fetch(download, { redirect: "follow" });
272
306
  if (!res.ok) throw new Error(`couldn't fetch the extension (${res.status} ${res.statusText})`);
273
307
  const bytes = Buffer.from(await res.arrayBuffer());
274
308
  const path = join2(tmpdir(), "superlore-preview.vsix");
@@ -433,10 +467,10 @@ function report(result) {
433
467
  function printManualInstall() {
434
468
  log.blank();
435
469
  log.info(
436
- `${dim("Install it by hand: download")} ${cyan("superlore.vercel.app/superlore-preview.vsix")}${dim(",")}`
470
+ `${dim("Install it by hand: open your editor's Extensions panel and search")} ${cyan('"superlore Preview"')}${dim(" (it's on Open VSX),")}`
437
471
  );
438
472
  log.info(
439
- `${dim("then run")} ${cyan('"Extensions: Install from VSIX\u2026"')} ${dim("in your editor (or")} ${cyan("code --install-extension <file>.vsix")}${dim(").")}`
473
+ `${dim("or run")} ${cyan("code --install-extension superlore.superlore-preview")} ${dim("(Cursor/Windsurf/VSCodium).")}`
440
474
  );
441
475
  }
442
476
  function printMcpNextStep() {
@@ -2481,7 +2515,7 @@ function printNextSteps(root, config) {
2481
2515
  }
2482
2516
 
2483
2517
  // src/index.ts
2484
- var VERSION = "0.7.0";
2518
+ var VERSION = "0.7.2";
2485
2519
  function buildCli(argv = process3.argv) {
2486
2520
  const cli = cac("superlore");
2487
2521
  cli.command("init [dir]", "Scaffold a new superlore knowledge base").option("--name <name>", "KB name").option("--type <type>", "KB type: company-kb | product-docs | personal-kb").option("--auth", "Enable the Google SSO auth gate").option("--no-auth", "Disable the auth gate").option("--allowed-domain <domain>", "Restrict SSO to one email domain (implies --auth)").option("--accent <color>", "Brand accent colour (any CSS colour)").option("--no-mcp", "Disable the MCP endpoint (on by default)").option("--connect", "Install the editor extension after scaffolding (skip the prompt)").option("--no-connect", "Don't set up the editor extension").option("-y, --yes", "Skip prompts; use flags + defaults").example("superlore init my-kb --type product-docs").example("superlore init acme --type company-kb --auth --allowed-domain acme.com").example("superlore init me --type personal-kb").action(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superlore-cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "The superlore CLI — scaffold, run, and build an agent-native knowledge base. One corpus. Humans and agents.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Krishnan S G",