@ggui-ai/console 0.1.0-rc.1

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.
@@ -0,0 +1 @@
1
+ import{g as s,r as c}from"./index-CepRJayt.js";function f(t,a){for(var o=0;o<a.length;o++){const e=a[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i=c();const p=s(i),g=f({__proto__:null,default:p},[i]);export{g as i};
@@ -0,0 +1,29 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta name="color-scheme" content="light" />
7
+ <meta name="description" content="Local operator surface for a self-hosted ggui serve instance. Same origin, no account, no hosted surface." />
8
+ <meta name="theme-color" content="#f4f3ed" />
9
+ <!--
10
+ Same-origin operator landing page served by `@ggui-ai/mcp-server`.
11
+ NOT Portal, NOT an MCP Apps shell — single-origin convenience only.
12
+ Brand identity follows `docs/brand/ggui-internal-brand-kit/v1.0.html`.
13
+ See docs/plans/2026-04-20-core-server-devtool-mvp.md.
14
+ -->
15
+ <title>ggui · server</title>
16
+ <!--
17
+ Favicon: just the first "g" glyph from the canonical wordmark
18
+ (`packages/iframe-runtime/src/system-cards/NoCredentialsCard.tsx`'s
19
+ `GguiWordmark` — see `docs/brand/ggui-internal-brand-kit/v1.0.html`).
20
+ Single-letter mark reads cleanly at 16px tab size.
21
+ -->
22
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Cpath d='M 0 0 H 50 V 25 H 25 V 50 H 0 Z' fill='%23292929'/%3E%3Crect x='33' y='33' width='17' height='17' fill='%23f4f3ed'/%3E%3C/svg%3E" />
23
+ <script type="module" crossorigin src="/assets/index-CepRJayt.js"></script>
24
+ <link rel="stylesheet" crossorigin href="/assets/index-CHgj9yqx.css">
25
+ </head>
26
+ <body>
27
+ <div id="root"></div>
28
+ </body>
29
+ </html>
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Absolute filesystem path to the built SPA's `dist/` directory.
3
+ *
4
+ * - Contents: `index.html`, `assets/*`.
5
+ * - Written by `vite build` (`pnpm --filter @ggui-ai/console build:spa`).
6
+ * - Consumed by `express.static(CONSOLE_DIST_DIR)` inside
7
+ * `@ggui-ai/mcp-server`'s `console: true` branch.
8
+ *
9
+ * If the directory does not exist at runtime, the console mount
10
+ * should surface a clear "run `pnpm build`" error rather than silently
11
+ * 404ing — that decision lives in mcp-server, not here.
12
+ */
13
+ export declare const CONSOLE_DIST_DIR: string;
14
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAiCA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAyC,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Server-side export for `@ggui-ai/console`.
3
+ *
4
+ * This module is imported by `@ggui-ai/mcp-server` to locate the built
5
+ * SPA bundle on disk. It contains **no browser code** — never import
6
+ * React, DOM types, or anything from `src/App.tsx` here.
7
+ *
8
+ * Rationale for the `./server` export split:
9
+ *
10
+ * - The SPA lives in `dist/` (Vite output: HTML + JS + CSS).
11
+ * - The server helper ships from `dist-server/server.js` (tsc output).
12
+ * - mcp-server only needs a path string (`CONSOLE_DIST_DIR`) +
13
+ * a type. Keeping those apart from the SPA bundle lets consumers
14
+ * import `@ggui-ai/console/server` without pulling the whole
15
+ * Vite output through their module graph.
16
+ *
17
+ * If you add more server-side helpers (e.g. CSP-policy factories),
18
+ * land them here — NOT in `src/App.tsx`.
19
+ */
20
+ import { fileURLToPath } from 'node:url';
21
+ import path from 'node:path';
22
+ /**
23
+ * Resolve the directory where this compiled module ends up at runtime.
24
+ * `dist-server/server.js` is the canonical location (see
25
+ * `tsconfig.server.json#compilerOptions.outDir`); `dist/` is its sibling.
26
+ *
27
+ * Computed via `import.meta.url` so the resolver is independent of
28
+ * CWD — consumers mount this server inside CLIs, Lambdas, and tests
29
+ * with arbitrary working directories.
30
+ */
31
+ const here = path.dirname(fileURLToPath(import.meta.url));
32
+ /**
33
+ * Absolute filesystem path to the built SPA's `dist/` directory.
34
+ *
35
+ * - Contents: `index.html`, `assets/*`.
36
+ * - Written by `vite build` (`pnpm --filter @ggui-ai/console build:spa`).
37
+ * - Consumed by `express.static(CONSOLE_DIST_DIR)` inside
38
+ * `@ggui-ai/mcp-server`'s `console: true` branch.
39
+ *
40
+ * If the directory does not exist at runtime, the console mount
41
+ * should surface a clear "run `pnpm build`" error rather than silently
42
+ * 404ing — that decision lives in mcp-server, not here.
43
+ */
44
+ export const CONSOLE_DIST_DIR = path.resolve(here, '..', 'dist');
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@ggui-ai/console",
3
+ "version": "0.1.0-rc.1",
4
+ "description": "Operator console for a self-hosted @ggui-ai/mcp-server instance — a single-origin admin and devtools surface served by the server itself.",
5
+ "keywords": [
6
+ "ggui",
7
+ "mcp",
8
+ "console",
9
+ "admin",
10
+ "operator",
11
+ "devtools"
12
+ ],
13
+ "license": "Apache-2.0",
14
+ "type": "module",
15
+ "files": [
16
+ "dist",
17
+ "dist-server",
18
+ "README.md"
19
+ ],
20
+ "exports": {
21
+ "./server": {
22
+ "types": "./dist-server/server.d.ts",
23
+ "import": "./dist-server/server.js",
24
+ "default": "./dist-server/server.js"
25
+ }
26
+ },
27
+ "dependencies": {
28
+ "react": "^19.0.0",
29
+ "react-dom": "^19.0.0",
30
+ "@ggui-ai/project-config": "0.1.0-rc.1",
31
+ "@ggui-ai/react": "0.1.0-rc.1",
32
+ "@ggui-ai/design": "0.1.0-rc.1"
33
+ },
34
+ "devDependencies": {
35
+ "@testing-library/react": "^16.0.0",
36
+ "@types/node": "^24.0.0",
37
+ "@types/react": "^19.0.0",
38
+ "@types/react-dom": "^19.0.0",
39
+ "@vitejs/plugin-react": "^4.3.0",
40
+ "jsdom": "^24.0.0",
41
+ "tsx": "^4.21.0",
42
+ "typescript": "^5.0.0",
43
+ "vite": "^6.4.2",
44
+ "vitest": "^3.0.0",
45
+ "@ggui-ai/protocol": "0.1.0-rc.1"
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "https://github.com/ggui-ai/ggui.git",
50
+ "directory": "packages/console"
51
+ },
52
+ "homepage": "https://github.com/ggui-ai/ggui/tree/main/packages/console",
53
+ "bugs": {
54
+ "url": "https://github.com/ggui-ai/ggui/issues"
55
+ },
56
+ "publishConfig": {
57
+ "access": "public"
58
+ },
59
+ "engines": {
60
+ "node": ">=20.0.0"
61
+ },
62
+ "author": "ggui contributors <hello@ggui.ai>",
63
+ "scripts": {
64
+ "build": "pnpm run build:spa && pnpm run build:server && pnpm run check:bundle-size",
65
+ "build:spa": "vite build",
66
+ "build:server": "tsc -p tsconfig.server.json",
67
+ "check:bundle-size": "tsx scripts/check-bundle-size.ts",
68
+ "dev": "vite",
69
+ "typecheck": "tsc --noEmit",
70
+ "test": "vitest run",
71
+ "test:watch": "vitest"
72
+ }
73
+ }