superlore-cli 0.7.2 → 0.7.3

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
@@ -41,6 +41,11 @@ interface SuperloreLogo {
41
41
  dark?: string;
42
42
  href?: string;
43
43
  }
44
+ /** Brand typefaces — family names the layout wires to `--font-sans` / `--font-mono`. */
45
+ interface SuperloreFont {
46
+ sans?: string;
47
+ mono?: string;
48
+ }
44
49
  /** The parsed, validated shape of a `superlore.json` file. */
45
50
  interface SuperloreJson {
46
51
  /** Human-facing KB name. */
@@ -55,6 +60,8 @@ interface SuperloreJson {
55
60
  logo?: SuperloreLogo;
56
61
  /** Favicon path (svg / png / ico). */
57
62
  favicon?: string;
63
+ /** Brand typefaces (the layout wires these to `--font-sans` / `--font-mono`). */
64
+ font?: SuperloreFont;
58
65
  /** The human gate. Omitted ⇒ public. */
59
66
  auth?: SuperloreAuthConfig;
60
67
  /** The agent surface. Omitted ⇒ MCP enabled at the default path. */
@@ -96,4 +103,4 @@ declare function serializeSuperloreJson(config: SuperloreJson): string;
96
103
  /** Resolve the MCP path for a config, falling back to the default when enabled and unset. */
97
104
  declare function resolveMcpPath(config: SuperloreJson): string | undefined;
98
105
 
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 };
106
+ export { DEFAULT_MCP_PATH, SUPERLORE_JSON_FILENAME, SUPERLORE_TYPES, type SuperloreAuthConfig, type SuperloreAuthProvider, type SuperloreFont, type SuperloreJson, type SuperloreJsonIssue, type SuperloreJsonResult, type SuperloreLogo, type SuperloreMcpConfig, type SuperloreType, parseSuperloreJson, resolveMcpPath, serializeSuperloreJson, validateSuperloreJson };
package/dist/config.js CHANGED
@@ -37,6 +37,23 @@ function validateSuperloreJson(input) {
37
37
  if (favicon !== void 0 && (typeof favicon !== "string" || favicon.trim().length === 0)) {
38
38
  issues.push({ path: "favicon", message: "must be a non-empty string (a path or URL)" });
39
39
  }
40
+ let font;
41
+ if (input.font !== void 0) {
42
+ if (!isRecord(input.font)) {
43
+ issues.push({ path: "font", message: "must be an object" });
44
+ } else {
45
+ const f = input.font;
46
+ for (const k of ["sans", "mono"]) {
47
+ if (f[k] !== void 0 && (typeof f[k] !== "string" || f[k].trim().length === 0)) {
48
+ issues.push({ path: `font.${k}`, message: "must be a non-empty string" });
49
+ }
50
+ }
51
+ font = {
52
+ sans: typeof f.sans === "string" ? f.sans : void 0,
53
+ mono: typeof f.mono === "string" ? f.mono : void 0
54
+ };
55
+ }
56
+ }
40
57
  let logo;
41
58
  if (input.logo !== void 0) {
42
59
  if (!isRecord(input.logo)) {
@@ -110,6 +127,7 @@ function validateSuperloreJson(input) {
110
127
  if (typeof accent === "string") value.accent = accent.trim();
111
128
  if (typeof theme === "string") value.theme = theme.trim();
112
129
  if (typeof favicon === "string") value.favicon = favicon.trim();
130
+ if (font && (font.sans || font.mono)) value.font = font;
113
131
  if (logo && (logo.light || logo.dark || logo.href)) value.logo = logo;
114
132
  if (auth) value.auth = auth;
115
133
  if (mcp) value.mcp = mcp;
package/dist/index.d.ts CHANGED
@@ -43,6 +43,11 @@ interface SuperloreLogo {
43
43
  dark?: string;
44
44
  href?: string;
45
45
  }
46
+ /** Brand typefaces — family names the layout wires to `--font-sans` / `--font-mono`. */
47
+ interface SuperloreFont {
48
+ sans?: string;
49
+ mono?: string;
50
+ }
46
51
  /** The parsed, validated shape of a `superlore.json` file. */
47
52
  interface SuperloreJson {
48
53
  /** Human-facing KB name. */
@@ -57,6 +62,8 @@ interface SuperloreJson {
57
62
  logo?: SuperloreLogo;
58
63
  /** Favicon path (svg / png / ico). */
59
64
  favicon?: string;
65
+ /** Brand typefaces (the layout wires these to `--font-sans` / `--font-mono`). */
66
+ font?: SuperloreFont;
60
67
  /** The human gate. Omitted ⇒ public. */
61
68
  auth?: SuperloreAuthConfig;
62
69
  /** The agent surface. Omitted ⇒ MCP enabled at the default path. */
@@ -99,10 +106,10 @@ declare function serializeSuperloreJson(config: SuperloreJson): string;
99
106
  declare function resolveMcpPath(config: SuperloreJson): string | undefined;
100
107
 
101
108
  /** The CLI version, kept in sync with package.json at build time. */
102
- declare const VERSION = "0.7.2";
109
+ declare const VERSION = "0.7.3";
103
110
  /** Build the argument parser. Exported for tests; `run()` wires it to argv. */
104
111
  declare function buildCli(argv?: readonly string[]): cac.CAC;
105
112
  /** Parse argv and dispatch. Reports unknown commands and unexpected errors cleanly. */
106
113
  declare function run(argv?: readonly string[]): Promise<void>;
107
114
 
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 };
115
+ export { DEFAULT_MCP_PATH, SUPERLORE_JSON_FILENAME, SUPERLORE_TYPES, type SuperloreAuthConfig, type SuperloreAuthProvider, type SuperloreFont, type SuperloreJson, type SuperloreJsonIssue, type SuperloreJsonResult, type SuperloreLogo, type SuperloreMcpConfig, type SuperloreType, VERSION, buildCli, parseSuperloreJson, resolveMcpPath, run, serializeSuperloreJson, validateSuperloreJson };
package/dist/index.js CHANGED
@@ -108,6 +108,23 @@ function validateSuperloreJson(input) {
108
108
  if (favicon !== void 0 && (typeof favicon !== "string" || favicon.trim().length === 0)) {
109
109
  issues.push({ path: "favicon", message: "must be a non-empty string (a path or URL)" });
110
110
  }
111
+ let font;
112
+ if (input.font !== void 0) {
113
+ if (!isRecord(input.font)) {
114
+ issues.push({ path: "font", message: "must be an object" });
115
+ } else {
116
+ const f = input.font;
117
+ for (const k of ["sans", "mono"]) {
118
+ if (f[k] !== void 0 && (typeof f[k] !== "string" || f[k].trim().length === 0)) {
119
+ issues.push({ path: `font.${k}`, message: "must be a non-empty string" });
120
+ }
121
+ }
122
+ font = {
123
+ sans: typeof f.sans === "string" ? f.sans : void 0,
124
+ mono: typeof f.mono === "string" ? f.mono : void 0
125
+ };
126
+ }
127
+ }
111
128
  let logo;
112
129
  if (input.logo !== void 0) {
113
130
  if (!isRecord(input.logo)) {
@@ -181,6 +198,7 @@ function validateSuperloreJson(input) {
181
198
  if (typeof accent2 === "string") value.accent = accent2.trim();
182
199
  if (typeof theme === "string") value.theme = theme.trim();
183
200
  if (typeof favicon === "string") value.favicon = favicon.trim();
201
+ if (font && (font.sans || font.mono)) value.font = font;
184
202
  if (logo && (logo.light || logo.dark || logo.href)) value.logo = logo;
185
203
  if (auth) value.auth = auth;
186
204
  if (mcp) value.mcp = mcp;
@@ -1969,14 +1987,22 @@ export default config;
1969
1987
  "app/layout.tsx",
1970
1988
  `import type { ReactNode } from "react";
1971
1989
  import { RootProvider } from "superlore/ui";
1990
+ import config from "../superlore.json";
1972
1991
  import "./global.css";
1973
1992
 
1974
1993
  export default function RootLayout({ children }: { children: ReactNode }) {
1975
- // Light and dark are co-equal; default to the system preference.
1994
+ // Light and dark are co-equal; default to the system preference. From superlore.json: \`theme\`
1995
+ // picks the visual skin (default | mint | geist | ledger | obsidian | prism | paste) and \`accent\`
1996
+ // drives the whole brand palette \u2014 change them there, no code edits.
1997
+ const theme = (config as { theme?: string }).theme;
1976
1998
  return (
1977
- <html lang="en" suppressHydrationWarning>
1999
+ <html
2000
+ lang="en"
2001
+ suppressHydrationWarning
2002
+ data-sl-theme={theme && theme !== "default" ? theme : undefined}
2003
+ >
1978
2004
  <body>
1979
- <RootProvider>{children}</RootProvider>
2005
+ <RootProvider accent={(config as { accent?: string }).accent}>{children}</RootProvider>
1980
2006
  </body>
1981
2007
  </html>
1982
2008
  );
@@ -2401,6 +2427,8 @@ async function initCommand(dir, flags) {
2401
2427
  const auth = authEnabled ? { enabled: true, provider: "google", ...allowedDomain ? { allowedDomain } : {} } : void 0;
2402
2428
  const draft = { name, type };
2403
2429
  if (accentColor) draft.accent = accentColor;
2430
+ const themeName = flags.theme?.trim();
2431
+ if (themeName) draft.theme = themeName;
2404
2432
  if (auth) draft.auth = auth;
2405
2433
  draft.mcp = { enabled: mcpEnabled, ...mcpEnabled ? { path: DEFAULT_MCP_PATH } : {} };
2406
2434
  const result = validateSuperloreJson(draft);
@@ -2515,7 +2543,7 @@ function printNextSteps(root, config) {
2515
2543
  }
2516
2544
 
2517
2545
  // src/index.ts
2518
- var VERSION = "0.7.2";
2546
+ var VERSION = "0.7.3";
2519
2547
  function buildCli(argv = process3.argv) {
2520
2548
  const cli = cac("superlore");
2521
2549
  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.2",
3
+ "version": "0.7.3",
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",