@ggui-ai/cli 0.25.0 → 0.26.0
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/README.md +3 -3
- package/dist/cli.js +3 -3
- package/dist/mcp-backend.d.ts +12 -3
- package/dist/mcp-backend.d.ts.map +1 -1
- package/dist/mcp-backend.js +15 -20
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +1 -1
- package/dist/persistent-stores.d.ts +28 -2
- package/dist/persistent-stores.d.ts.map +1 -1
- package/dist/persistent-stores.js +36 -5
- package/dist/serve-command.d.ts +3 -3
- package/dist/serve-command.d.ts.map +1 -1
- package/dist/serve-command.js +1 -2
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -71,13 +71,13 @@ When the variable is unset, or the module fails shape validation, the CLI falls
|
|
|
71
71
|
| `ggui whoami` | Print the authenticated user. |
|
|
72
72
|
| `ggui keys` | Manage `ggui_user_*` connector keys (list / create / revoke). |
|
|
73
73
|
| `ggui create` | Create cloud resources tied to this project (`create app` writes `appId` into `ggui.json`). |
|
|
74
|
-
| `ggui gadget` | Author gadgets for the
|
|
75
|
-
| `ggui blueprint` | Author UI blueprints for the
|
|
74
|
+
| `ggui gadget` | Author gadgets for the GGUI marketplace (`gadget create <scope/name>` scaffolds a repo). |
|
|
75
|
+
| `ggui blueprint` | Author UI blueprints for the GGUI marketplace (`blueprint create <scope/name>` scaffolds a repo). |
|
|
76
76
|
| `ggui theme` | Validate + inspect operator-authored DTCG themes (`theme validate <path>`). |
|
|
77
77
|
| `ggui export-pool` | Export this deployment's reusable blueprints as a shareable pool directory; load elsewhere via `ggui serve --seed-pool <dir>`. |
|
|
78
78
|
| `ggui push` | Compile + bulk-push blueprints to a ggui.ai cloud app (requires `ggui login`). |
|
|
79
79
|
| `ggui deploy` | Provision + wire a ggui.ai cloud app for this project (idempotent). |
|
|
80
|
-
| `ggui provider-key` | Manage provider API keys for a cloud
|
|
80
|
+
| `ggui provider-key` | Manage provider API keys for a cloud GGUI app (`provider-key set --app <appId>`). |
|
|
81
81
|
|
|
82
82
|
Run `ggui --help` for per-command flags.
|
|
83
83
|
|
package/dist/cli.js
CHANGED
|
@@ -26,7 +26,7 @@ import { buildSeedPool } from '@ggui-ai/mcp-server-handlers';
|
|
|
26
26
|
import { createThemeWriter } from './theme-writer.js';
|
|
27
27
|
import { createThemeFileUploader } from './theme-file-uploader.js';
|
|
28
28
|
import { getPersistentDir } from './paths.js';
|
|
29
|
-
import {
|
|
29
|
+
import { createPersistentVectorStore, layerPersistentSessionStores, } from './persistent-stores.js';
|
|
30
30
|
import { parseServeFlags, runServe, SERVE_HELP, } from './serve-command.js';
|
|
31
31
|
import { runLoginCommand } from './auth-login.js';
|
|
32
32
|
import { runLogoutCommand } from './auth-logout.js';
|
|
@@ -299,8 +299,8 @@ async function runServeCommand(args) {
|
|
|
299
299
|
// resolved above) — the operator asked for it by name.
|
|
300
300
|
if (!manifestDeclaresRenders && storage.renderStore === undefined) {
|
|
301
301
|
try {
|
|
302
|
-
|
|
303
|
-
storage =
|
|
302
|
+
// The sessions and their stream buffer, both or neither (ggui#1534).
|
|
303
|
+
storage = await layerPersistentSessionStores(storage, persistentDir);
|
|
304
304
|
}
|
|
305
305
|
catch (err) {
|
|
306
306
|
process.stderr.write(`ggui serve: persistent render store unavailable — using in-memory `
|
package/dist/mcp-backend.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BlueprintProvider, type DiscoveredPrimitiveCatalog, type GadgetDescriptor, type GenerationDeps, type LoadedTheme, type McpServerMount, type McpUiDisplayMode, type OperatorConfig, type ResolvedStorageStores, type ShortCodeIndex, type ThemeWriter } from "@ggui-ai/mcp-server";
|
|
1
|
+
import { type BlueprintProvider, type DiscoveredPrimitiveCatalog, type GadgetDescriptor, type GenerationDeps, type LoadedTheme, type McpServerMount, type McpUiDisplayMode, type OperatorConfig, type ResolvedStorageStores, type ShortCodeIndex, type ThemeFileUploader, type ThemeWriter } from "@ggui-ai/mcp-server";
|
|
2
2
|
import { type BlueprintPool } from "@ggui-ai/mcp-server-handlers/renders";
|
|
3
3
|
import type { ThemeConfig, UiManifest } from "@ggui-ai/project-config";
|
|
4
4
|
import type { UiRegistry } from "@ggui-ai/ui-registry";
|
|
@@ -81,6 +81,15 @@ export interface BuildMcpServerBackendOptions {
|
|
|
81
81
|
* is on disk.
|
|
82
82
|
*/
|
|
83
83
|
readonly themeWriter?: ThemeWriter;
|
|
84
|
+
/**
|
|
85
|
+
* Theme file uploader for the admin-gated `/ggui/console/theme/upload`
|
|
86
|
+
* POST, which writes an uploaded theme document next to `ggui.json`.
|
|
87
|
+
* The route is enabled only when BOTH this and {@link themeWriter} are
|
|
88
|
+
* present; otherwise it answers 501. The CLI builds it from the same
|
|
89
|
+
* manifest path via `createThemeFileUploader` (ggui#1579: it was built
|
|
90
|
+
* and never forwarded, so `ggui serve` never enabled uploads).
|
|
91
|
+
*/
|
|
92
|
+
readonly themeFileUploader?: ThemeFileUploader;
|
|
84
93
|
/**
|
|
85
94
|
* Live theme getter — when set, supersedes the static `theme`
|
|
86
95
|
* resolution for every `ggui_render` bootstrap envelope. The CLI
|
|
@@ -244,8 +253,8 @@ export interface BuildMcpServerBackendOptions {
|
|
|
244
253
|
/**
|
|
245
254
|
* Server-level MCP instructions preset. Threaded straight through
|
|
246
255
|
* to `createGguiServer({mcpInstructions})`. Falls back to the
|
|
247
|
-
* `GGUI_MCP_INSTRUCTIONS` env var when absent. Both absent =
|
|
248
|
-
* `createGguiServer`'s
|
|
256
|
+
* `GGUI_MCP_INSTRUCTIONS` env var when absent. Both absent = no
|
|
257
|
+
* instructions are sent (`createGguiServer`'s default is `'off'`).
|
|
249
258
|
*
|
|
250
259
|
* Surface = `--mcp-instructions <preset>` CLI flag or
|
|
251
260
|
* `GGUI_MCP_INSTRUCTIONS` env var (CLI flag wins).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-backend.d.ts","sourceRoot":"","s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ildMcpServerBackend(opts) {
|
|
|
219
219
|
emailSender = fallback.sender;
|
|
220
220
|
emailFromAddress = process.env.GGUI_EMAIL_FROM?.trim() || defaultFromAddress;
|
|
221
221
|
}
|
|
222
|
-
// Resolve cross-restart HMAC
|
|
223
|
-
// persistent dir, read-or-mint `ws-token-secret.hex`
|
|
224
|
-
//
|
|
225
|
-
//
|
|
226
|
-
//
|
|
227
|
-
//
|
|
228
|
-
//
|
|
222
|
+
// Resolve the cross-restart HMAC secret. When the caller declared a
|
|
223
|
+
// persistent dir, read-or-mint `ws-token-secret.hex` (32 bytes / 64 hex
|
|
224
|
+
// chars, 0600) and thread it into `createGguiServer` below, so the server
|
|
225
|
+
// stops minting a fresh process-local secret every boot: the precondition
|
|
226
|
+
// for any cached `_meta["ai.ggui/render"].wsToken` surviving a restart.
|
|
227
|
+
// Absent dir = ephemeral behavior. (No render-signer secret: the server's
|
|
228
|
+
// render-signing layer was removed with the /r/ viewer, ggui#1579.)
|
|
229
229
|
let persistedWsTokenSecret;
|
|
230
|
-
let persistedRenderSignerSecret;
|
|
231
230
|
if (opts.persistentDir !== undefined) {
|
|
232
231
|
persistedWsTokenSecret = readOrMintHexSecret(join(opts.persistentDir, "ws-token-secret.hex"));
|
|
233
|
-
persistedRenderSignerSecret = readOrMintHexSecret(join(opts.persistentDir, "render-signer-secret.hex"));
|
|
234
232
|
}
|
|
235
233
|
// Resolve withholdResultMeta: CLI flag wins over env var.
|
|
236
234
|
const envWithhold = process.env.GGUI_WITHHOLD_RESULT_META?.trim();
|
|
237
235
|
const resolvedWithhold = opts.withholdResultMeta === true || (opts.withholdResultMeta === undefined && (envWithhold === "1" || envWithhold === "true"));
|
|
238
236
|
// Resolve mcpInstructions: CLI flag wins over env var. Validated
|
|
239
237
|
// env-var values pass through to createGguiServer; invalid values
|
|
240
|
-
// fall through to the no
|
|
238
|
+
// fall through to the default (no instructions) with a one-line warning.
|
|
241
239
|
const envInstructions = process.env.GGUI_MCP_INSTRUCTIONS?.trim();
|
|
242
240
|
let resolvedMcpInstructions = opts.mcpInstructions;
|
|
243
241
|
if (resolvedMcpInstructions === undefined && envInstructions) {
|
|
@@ -250,7 +248,7 @@ export function buildMcpServerBackend(opts) {
|
|
|
250
248
|
}
|
|
251
249
|
else {
|
|
252
250
|
// eslint-disable-next-line no-console -- one-shot boot warning
|
|
253
|
-
console.warn(`[ggui-cli] GGUI_MCP_INSTRUCTIONS='${envInstructions}' not recognized;
|
|
251
|
+
console.warn(`[ggui-cli] GGUI_MCP_INSTRUCTIONS='${envInstructions}' not recognized; sending no instructions (the default).`);
|
|
254
252
|
}
|
|
255
253
|
}
|
|
256
254
|
// Per-app metadata store seeded from `ggui.json#theme.preset` (when
|
|
@@ -401,16 +399,10 @@ export function buildMcpServerBackend(opts) {
|
|
|
401
399
|
// Co-binding with `appMetadataStore` mounts `ggui_list_themes` on
|
|
402
400
|
// the agent route.
|
|
403
401
|
themes: () => listThemes(),
|
|
404
|
-
// Cross-restart HMAC
|
|
405
|
-
// persistent dir
|
|
406
|
-
//
|
|
407
|
-
// process. render-signer.secret rides on the `renderSigning`
|
|
408
|
-
// discriminated union (the `false` shape disables the layer
|
|
409
|
-
// entirely; we always want it on here, so build the object form).
|
|
402
|
+
// Cross-restart HMAC secret. Present iff the caller declared a
|
|
403
|
+
// persistent dir, so the next restart verifies tokens the previous run
|
|
404
|
+
// minted instead of regenerating per process.
|
|
410
405
|
...(persistedWsTokenSecret !== undefined ? { wsTokenSecret: persistedWsTokenSecret } : {}),
|
|
411
|
-
...(persistedRenderSignerSecret !== undefined
|
|
412
|
-
? { renderSigning: { secret: persistedRenderSignerSecret } }
|
|
413
|
-
: {}),
|
|
414
406
|
...(resolvedMcpInstructions !== undefined ? { mcpInstructions: resolvedMcpInstructions } : {}),
|
|
415
407
|
...(resolvedWithhold ? { withholdResultMeta: true } : {}),
|
|
416
408
|
// `--multi-user` flips the `/ggui/console/llm-keys` gate from
|
|
@@ -425,6 +417,8 @@ export function buildMcpServerBackend(opts) {
|
|
|
425
417
|
...(opts.publicBaseUrl ? { publicBaseUrl: opts.publicBaseUrl } : {}),
|
|
426
418
|
...(rateLimiter ? { rateLimiter } : {}),
|
|
427
419
|
...(storage.renderStore ? { renderStore: storage.renderStore } : {}),
|
|
420
|
+
// The live channel's buffer, persistent when the sessions are (ggui#1534).
|
|
421
|
+
...(storage.streamBuffer ? { streamBuffer: storage.streamBuffer } : {}),
|
|
428
422
|
// Always pass the materialized vectorStore so the install bridge
|
|
429
423
|
// and the matcher share state. Passing only `storage.vectors`
|
|
430
424
|
// (set when the manifest declares sqlite) would, on an absent
|
|
@@ -559,6 +553,7 @@ export function buildMcpServerBackend(opts) {
|
|
|
559
553
|
// read-only banner + POST returns 501. CLI sets this when
|
|
560
554
|
// `plan.projectRoot` resolved to a manifest path on disk.
|
|
561
555
|
...(opts.themeWriter ? { themeWriter: opts.themeWriter } : {}),
|
|
556
|
+
...(opts.themeFileUploader ? { themeFileUploader: opts.themeFileUploader } : {}),
|
|
562
557
|
// Live-theme wiring — `themeProvider` reads from a shared cell
|
|
563
558
|
// that `onThemeConfigChange` writes to on every console save,
|
|
564
559
|
// so the picker's "Save to ggui.json" reaches the next render's
|
package/dist/paths.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export declare function getEmbeddingCacheDir(): string;
|
|
|
56
56
|
export declare function getCodeCacheDir(): string;
|
|
57
57
|
/**
|
|
58
58
|
* Directory backing the `--persistent` bundle (sessions.sqlite,
|
|
59
|
-
* short-codes.sqlite, bootstrap-secret.hex,
|
|
59
|
+
* short-codes.sqlite, bootstrap-secret.hex,
|
|
60
60
|
* keys.json …). Survives `ggui serve` restarts so claude.ai chat-history
|
|
61
61
|
* revisits can rehydrate the iframe instead of seeing four cascading
|
|
62
62
|
* failures (HMAC + shortCode + render + pairing).
|
package/dist/paths.js
CHANGED
|
@@ -91,7 +91,7 @@ export function getCodeCacheDir() {
|
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* Directory backing the `--persistent` bundle (sessions.sqlite,
|
|
94
|
-
* short-codes.sqlite, bootstrap-secret.hex,
|
|
94
|
+
* short-codes.sqlite, bootstrap-secret.hex,
|
|
95
95
|
* keys.json …). Survives `ggui serve` restarts so claude.ai chat-history
|
|
96
96
|
* revisits can rehydrate the iframe instead of seeing four cascading
|
|
97
97
|
* failures (HMAC + shortCode + render + pairing).
|
|
@@ -1,5 +1,31 @@
|
|
|
1
|
-
import type { GguiSessionStore, VectorStore } from '@ggui-ai/mcp-server-core';
|
|
2
|
-
|
|
1
|
+
import type { GguiSessionStore, GguiSessionStreamBuffer, VectorStore } from '@ggui-ai/mcp-server-core';
|
|
2
|
+
import type { ResolvedStorageStores } from '@ggui-ai/mcp-server';
|
|
3
|
+
/** The persistent session store and the live channel's stream buffer, opened together. */
|
|
4
|
+
export interface PersistentSessionStores {
|
|
5
|
+
readonly renderStore: GguiSessionStore;
|
|
6
|
+
readonly streamBuffer: GguiSessionStreamBuffer;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The persistent sessions and, in the same `sessions.sqlite`, the live
|
|
10
|
+
* channel's stream buffer (ggui#1534), so a session that survives a restart
|
|
11
|
+
* also keeps its stream `seq`, its epoch and its retained envelopes, and a
|
|
12
|
+
* reconnect replays what it missed.
|
|
13
|
+
*
|
|
14
|
+
* Both or neither, by construction: an in-memory store with a persistent
|
|
15
|
+
* buffer would keep counters for sessions that no longer exist, and a
|
|
16
|
+
* persistent store with an in-memory buffer is the gap this closes. If the
|
|
17
|
+
* buffer cannot open, the store it opened first is closed and the error
|
|
18
|
+
* propagates.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createPersistentSessionStores(persistentDir: string): Promise<PersistentSessionStores>;
|
|
21
|
+
/**
|
|
22
|
+
* `ggui serve`'s persistent layer for sessions: when nothing resolved a
|
|
23
|
+
* render store (no `ggui.json#storage.renders`), add the persistent session
|
|
24
|
+
* store and its stream buffer, together (ggui#1534). A bundle that already
|
|
25
|
+
* has a render store is returned untouched. Throws when SQLite is
|
|
26
|
+
* unavailable; the caller falls back to the in-memory defaults.
|
|
27
|
+
*/
|
|
28
|
+
export declare function layerPersistentSessionStores(storage: ResolvedStorageStores, persistentDir: string): Promise<ResolvedStorageStores>;
|
|
3
29
|
export declare function createPersistentVectorStore(persistentDir: string): Promise<VectorStore>;
|
|
4
30
|
/**
|
|
5
31
|
* Compute the auto-default `keysFile` path. Returns `undefined` when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistent-stores.d.ts","sourceRoot":"","sources":["../src/persistent-stores.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"persistent-stores.d.ts","sourceRoot":"","sources":["../src/persistent-stores.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,0FAA0F;AAC1F,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;IACvC,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC;CAChD;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,6BAA6B,CACjD,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,uBAAuB,CAAC,CAalC;AAED;;;;;;GAMG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,qBAAqB,EAC9B,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,qBAAqB,CAAC,CAIhC;AAED,wBAAsB,2BAA2B,CAC/C,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,WAAW,CAAC,CAQtB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAE7D"}
|
|
@@ -16,12 +16,43 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { mkdirSync } from 'node:fs';
|
|
18
18
|
import { join } from 'node:path';
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* The persistent sessions and, in the same `sessions.sqlite`, the live
|
|
21
|
+
* channel's stream buffer (ggui#1534), so a session that survives a restart
|
|
22
|
+
* also keeps its stream `seq`, its epoch and its retained envelopes, and a
|
|
23
|
+
* reconnect replays what it missed.
|
|
24
|
+
*
|
|
25
|
+
* Both or neither, by construction: an in-memory store with a persistent
|
|
26
|
+
* buffer would keep counters for sessions that no longer exist, and a
|
|
27
|
+
* persistent store with an in-memory buffer is the gap this closes. If the
|
|
28
|
+
* buffer cannot open, the store it opened first is closed and the error
|
|
29
|
+
* propagates.
|
|
30
|
+
*/
|
|
31
|
+
export async function createPersistentSessionStores(persistentDir) {
|
|
20
32
|
mkdirSync(persistentDir, { recursive: true });
|
|
21
|
-
const { SqliteGguiSessionStore } = await import('@ggui-ai/mcp-server-core/sqlite');
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
const { SqliteGguiSessionStore, SqliteGguiSessionStreamBuffer } = await import('@ggui-ai/mcp-server-core/sqlite');
|
|
34
|
+
const filename = join(persistentDir, 'sessions.sqlite');
|
|
35
|
+
const renderStore = new SqliteGguiSessionStore({ filename });
|
|
36
|
+
try {
|
|
37
|
+
return { renderStore, streamBuffer: new SqliteGguiSessionStreamBuffer({ filename }) };
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
renderStore.close();
|
|
41
|
+
throw err;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* `ggui serve`'s persistent layer for sessions: when nothing resolved a
|
|
46
|
+
* render store (no `ggui.json#storage.renders`), add the persistent session
|
|
47
|
+
* store and its stream buffer, together (ggui#1534). A bundle that already
|
|
48
|
+
* has a render store is returned untouched. Throws when SQLite is
|
|
49
|
+
* unavailable; the caller falls back to the in-memory defaults.
|
|
50
|
+
*/
|
|
51
|
+
export async function layerPersistentSessionStores(storage, persistentDir) {
|
|
52
|
+
if (storage.renderStore !== undefined)
|
|
53
|
+
return storage;
|
|
54
|
+
const { renderStore, streamBuffer } = await createPersistentSessionStores(persistentDir);
|
|
55
|
+
return { ...storage, renderStore, streamBuffer };
|
|
25
56
|
}
|
|
26
57
|
export async function createPersistentVectorStore(persistentDir) {
|
|
27
58
|
mkdirSync(persistentDir, { recursive: true });
|
package/dist/serve-command.d.ts
CHANGED
|
@@ -154,10 +154,10 @@ export interface ParsedServeFlags {
|
|
|
154
154
|
* advisory level for tool-use posture:
|
|
155
155
|
*
|
|
156
156
|
* - `default` — gentle "ggui first when UI fits, prose otherwise"
|
|
157
|
-
* - `aggressive` — render anything with structure
|
|
157
|
+
* - `aggressive` — render anything with structure
|
|
158
158
|
* - `always` — every response renders via ggui_render
|
|
159
159
|
* - `minimal` — server identity only, no behavioral nudge
|
|
160
|
-
* - `off` — omit the field entirely
|
|
160
|
+
* - `off` — omit the field entirely (also what an unset flag does)
|
|
161
161
|
*
|
|
162
162
|
* Surface = `--mcp-instructions <preset>` or
|
|
163
163
|
* `GGUI_MCP_INSTRUCTIONS=<preset>` env var (CLI flag wins).
|
|
@@ -537,5 +537,5 @@ export interface RunServeOptions {
|
|
|
537
537
|
* {@link describeServeBanner} / {@link describeAgentStatus}.
|
|
538
538
|
*/
|
|
539
539
|
export declare function runServe(opts: RunServeOptions): Promise<number>;
|
|
540
|
-
export declare const SERVE_HELP = "ggui serve \u2014 run the open self-hosted personal-mode app\n\nBoots the @ggui-ai/mcp-server binding with persistent defaults AND\n(by default) supervises your agent alongside it. The current MCP\nhandler surface is the blueprint-read family (search / list_featured\n/ render); more tools come online as @ggui-ai/mcp-server-handlers\ngrows.\n\nFirst-run bundle (all on by default):\n - Landing page at / \u2014 operator opens a browser and sees\n server identity + pair-code card.\n - Render viewer at /r/<code> \u2014 same-origin viewer for renders\n minted by ggui_render; same-origin\n HTTP-only cookie authenticates the\n live-channel /ws upgrade.\n - POST /pair + POST /admin/pair/init \u2014 pairing endpoint for MCP\n hosts and third-party clients.\n - Live-channel /ws \u2014 live render plane for MCP Apps\n iframes and the console.\n\nEmbedding hosts that want a different shape (no landing page, no\npairing, programmatic control) should compose createGguiServer()\ndirectly in code rather than invoking `ggui serve`.\n\nUsage:\n ggui serve [options]\n\nOptions:\n --port <n> Bind port (default: 6781, 0 = OS-assigned).\n --host <addr> Bind host (default: 127.0.0.1).\n --mcp-only Run just the MCP server; do not supervise an agent.\n --dev-allow-all Accept any non-empty bearer (incl. no bearer) as\n builder. Local-dev / tunnel smoke ONLY \u2014 never\n expose to the open internet.\n --public-demo Public-facing demo posture: same any-bearer auth\n as --dev-allow-all, plus per-IP rate limit on\n ggui_render (30 generations / 10 min) and a\n \"PUBLIC DEMO \u2014 operator pays\" banner. Mutually\n exclusive with --dev-allow-all.\n --multi-user Multi-user posture: switches the /settings LLM-\n keys gate from admin-token to auth-adapter so\n each authenticated end-user manages their OWN\n key plane (scope = userId/appId). kind:'builder'\n identities are rejected at the gate. Strict-auth\n only; mutually exclusive with --dev-allow-all\n and --public-demo. (Generation-time BYOK still\n resolves at the operator 'global' scope \u2014 a\n follow-up will thread per-user BYOK through\n ggui_render.)\n --local-cli-login Generate with the Claude login already on this\n machine (the one `claude` uses) when no\n ANTHROPIC_API_KEY is set, instead of an API key.\n Anthropic routes only; a real key always wins. Your\n Claude plan's terms and usage limits apply, and\n generation is about 2x slower (2.2x at the median)\n than with an API key. For your own use: refused with\n --multi-user and --public-demo.\n --public-base-url <u> Override the public base URL used to compose\n iframe-runtime + shortCode URLs. Set this to a\n tunnel URL (https://<random>.trycloudflare.com)\n when testing against a remote MCP host so URLs\n resolve from the host's perspective. Without\n this, URLs derive from --host:--port and only\n work from the same machine.\n --browser-origin <o> Allow pages at this origin past MCP-wire Origin\n validation (repeatable; env GGUI_BROWSER_ORIGINS,\n comma-separated). Pages on localhost need no\n entry. NOT authentication \u2014 /mcp still requires\n a bearer. Non-browser clients are unaffected.\n --oauth Mount OAuth 2.1 + PKCE + Dynamic Client\n Registration routes (.well-known/oauth-* +\n /oauth/{authorize,token,register}). Required\n for MCP custom-connector hosts (claude.ai,\n ChatGPT) whose Add Connector form has no field\n for a pre-shared bearer; OAuth lets them do\n a discovery \u2192 DCR \u2192 consent dance ending in\n the same paired bearer the strict-auth flow\n already mints. Pure-bearer clients (Claude\n Desktop with bearer in config) work without it.\n --admin-token <t> Pin the admin bearer that gates the console\n /keys plane (list / mint / revoke pairings +\n /admin-login route). Without this, the server\n mints a fresh ggui_admin_* token per boot and\n prints it on the banner. Pin a stable value\n when you want the bearer to survive restarts\n (e.g. paste once into a password manager).\n --ephemeral Disable cross-restart persistence. Without\n this flag, the HMAC secrets that sign MCP\n Apps bootstrap tokens and signed render URLs\n are read or minted under .ggui/persistent/\n (project-local if a ggui.json was resolved,\n else ~/.ggui/persistent/) so cached tokens\n survive a server restart. Pass this flag to\n keep restarts ephemeral (tests / CI / nuclear-\n revoke). Override the dir via GGUI_PERSISTENT_DIR.\n --seed-pool <dir> Load a read-only shared blueprint pool from a\n directory artifact (repeatable). Blueprints in it\n are reused by exact contract match, after your own.\n --help, -h Show this help.\n\nAgent runtime:\n The default boots your agent alongside MCP. The agent's entry file\n comes from ggui.json:\n\n { \"agent\": { \"entry\": \"./agent.ts\" } }\n\n Supported extensions: .js / .mjs / .cjs (node), .ts / .tsx / .mts\n (node --import=tsx). No ggui.json, or no agent.entry, falls back\n to MCP-only with a warning. Malformed ggui.json or a bad entry\n is a hard error.\n\n Agent crashes after startup are logged; the MCP server keeps\n running. No auto-restart \u2014 compose that with your own supervisor.\n\nPersistent storage (default-on; opt-out via --ephemeral):\n By default `ggui serve` writes a small bundle under .ggui/persistent/\n (project-local if a ggui.json was resolved, else ~/.ggui/persistent/)\n so cached MCP Apps tokens, signed render URLs, shortCodes, renders,\n vectors, and paired bearers survive a restart \u2014 claude.ai chat-history\n revisits keep working.\n\n Bundle layout:\n\n .ggui/persistent/\n \u251C\u2500\u2500 ws-token-secret.hex (HMAC, 0600)\n \u251C\u2500\u2500 render-signer-secret.hex (HMAC, 0600)\n \u251C\u2500\u2500 short-codes.sqlite (signed render-URL resolution)\n \u251C\u2500\u2500 sessions.sqlite (GguiSessionStore \u2014 renders + event history)\n \u251C\u2500\u2500 vectors.sqlite (RAG corpus)\n \u2514\u2500\u2500 keys.json (paired bearers)\n\n Override the dir with `GGUI_PERSISTENT_DIR`. Pass `--ephemeral` to\n skip the bundle entirely (tests, CI loops, nuclear-revoke).\n\n Explicit ggui.json#storage declarations always win \u2014 declare\n `{ \"renders\": { \"driver\": \"memory\" } }` to opt renders back to\n in-memory while keeping other surfaces persistent. Custom sqlite\n paths via ggui.json#storage are honored verbatim:\n\n {\n \"storage\": {\n \"renders\": { \"driver\": \"sqlite\", \"path\": \"./ggui-sessions.sqlite\" },\n \"vectors\": { \"driver\": \"sqlite\", \"path\": \"./ggui-vectors.sqlite\" },\n \"threads\": { \"driver\": \"sqlite\", \"path\": \"./ggui-threads.sqlite\" }\n }\n }\n\n Threads: the persistent-chat route family (/threads) is opt-in.\n Absent `storage.threads` leaves the routes unmounted \u2014 pairs\n with Portal's self-hosted origins only when declared. Driver\n semantics:\n - `driver: \"sqlite\"` \u2014 durable. Threads survive restart.\n /ggui/health reports `threads.durability: \"durable\"`;\n Portal hides its non-durable caveat.\n - `driver: \"memory\"` \u2014 routes mount but data is lost on\n restart. /ggui/health reports `threads.durability:\n \"ephemeral\"`; Portal shows its caveat.\n\n Paths resolve relative to the ggui.json directory. The sqlite\n driver needs `better-sqlite3` installed in your project.\n\nRecommended setups:\n\n Local-only smoke (no tunnel, no remote MCP host):\n ggui serve\n\n claude.ai custom connector (over a public tunnel):\n 1. Tunnel: cloudflared tunnel --url http://localhost:6781\n 2. ggui serve --oauth \\\n --public-base-url https://<tunnel>.trycloudflare.com\n 3. Note PAIR_CODE from boot. Visit the landing page (the public URL\n above), complete pairing, save the bearer.\n 4. claude.ai \u2192 Settings \u2192 Connectors \u2192 Add custom connector.\n URL: https://<tunnel>.trycloudflare.com/mcp\n Client ID / Secret: leave empty (server uses Dynamic Client\n Registration; no pre-shared secret needed).\n 5. Click Connect \u2192 claude.ai redirects you to a paste-key page.\n Paste the bearer from step 3. Done.\n\n Quick local-dev WITHOUT auth (NEVER over a public tunnel):\n ggui serve --dev-allow-all\n\nCurrent limits:\n - Strict-auth only: /mcp rejects any bearer that isn't pair-minted.\n The CLI pre-mints one pairing code on boot (printed as\n `PAIR_CODE <code>` and shown in the banner + on the landing\n page). Complete `POST /pair {code, deviceName}` to receive a\n bearer you can use with MCP. Embed @ggui-ai/mcp-server in your\n own entrypoint to inject a different AuthAdapter (OIDC, Cognito,\n etc.) for production.\n - Single-user: every request scopes to one `builder` app id.\n";
|
|
540
|
+
export declare const SERVE_HELP = "ggui serve \u2014 run the open self-hosted personal-mode app\n\nBoots the @ggui-ai/mcp-server binding with persistent defaults AND\n(by default) supervises your agent alongside it. The current MCP\nhandler surface is the blueprint-read family (search / list_featured\n/ render); more tools come online as @ggui-ai/mcp-server-handlers\ngrows.\n\nFirst-run bundle (all on by default):\n - Landing page at / \u2014 operator opens a browser and sees\n server identity + pair-code card.\n - Render viewer at /r/<code> \u2014 same-origin viewer for renders\n minted by ggui_render; same-origin\n HTTP-only cookie authenticates the\n live-channel /ws upgrade.\n - POST /pair + POST /admin/pair/init \u2014 pairing endpoint for MCP\n hosts and third-party clients.\n - Live-channel /ws \u2014 live render plane for MCP Apps\n iframes and the console.\n\nEmbedding hosts that want a different shape (no landing page, no\npairing, programmatic control) should compose createGguiServer()\ndirectly in code rather than invoking `ggui serve`.\n\nUsage:\n ggui serve [options]\n\nOptions:\n --port <n> Bind port (default: 6781, 0 = OS-assigned).\n --host <addr> Bind host (default: 127.0.0.1).\n --mcp-only Run just the MCP server; do not supervise an agent.\n --dev-allow-all Accept any non-empty bearer (incl. no bearer) as\n builder. Local-dev / tunnel smoke ONLY \u2014 never\n expose to the open internet.\n --public-demo Public-facing demo posture: same any-bearer auth\n as --dev-allow-all, plus per-IP rate limit on\n ggui_render (30 generations / 10 min) and a\n \"PUBLIC DEMO \u2014 operator pays\" banner. Mutually\n exclusive with --dev-allow-all.\n --multi-user Multi-user posture: switches the /settings LLM-\n keys gate from admin-token to auth-adapter so\n each authenticated end-user manages their OWN\n key plane (scope = userId/appId). kind:'builder'\n identities are rejected at the gate. Strict-auth\n only; mutually exclusive with --dev-allow-all\n and --public-demo. (Generation-time BYOK still\n resolves at the operator 'global' scope \u2014 a\n follow-up will thread per-user BYOK through\n ggui_render.)\n --local-cli-login Generate with the Claude login already on this\n machine (the one `claude` uses) when no\n ANTHROPIC_API_KEY is set, instead of an API key.\n Anthropic routes only; a real key always wins. Your\n Claude plan's terms and usage limits apply, and\n generation is about 2x slower (2.2x at the median)\n than with an API key. For your own use: refused with\n --multi-user and --public-demo.\n --public-base-url <u> Override the public base URL used to compose\n iframe-runtime + shortCode URLs. Set this to a\n tunnel URL (https://<random>.trycloudflare.com)\n when testing against a remote MCP host so URLs\n resolve from the host's perspective. Without\n this, URLs derive from --host:--port and only\n work from the same machine.\n --browser-origin <o> Allow pages at this origin past MCP-wire Origin\n validation (repeatable; env GGUI_BROWSER_ORIGINS,\n comma-separated). Pages on localhost need no\n entry. NOT authentication \u2014 /mcp still requires\n a bearer. Non-browser clients are unaffected.\n --oauth Mount OAuth 2.1 + PKCE + Dynamic Client\n Registration routes (.well-known/oauth-* +\n /oauth/{authorize,token,register}). Required\n for MCP custom-connector hosts (claude.ai,\n ChatGPT) whose Add Connector form has no field\n for a pre-shared bearer; OAuth lets them do\n a discovery \u2192 DCR \u2192 consent dance ending in\n the same paired bearer the strict-auth flow\n already mints. Pure-bearer clients (Claude\n Desktop with bearer in config) work without it.\n --admin-token <t> Pin the admin bearer that gates the console\n /keys plane (list / mint / revoke pairings +\n /admin-login route). Without this, the server\n mints a fresh ggui_admin_* token per boot and\n prints it on the banner. Pin a stable value\n when you want the bearer to survive restarts\n (e.g. paste once into a password manager).\n --ephemeral Disable cross-restart persistence. Without\n this flag, the HMAC secrets that sign MCP\n Apps bootstrap tokens and signed render URLs\n are read or minted under .ggui/persistent/\n (project-local if a ggui.json was resolved,\n else ~/.ggui/persistent/) so cached tokens\n survive a server restart. Pass this flag to\n keep restarts ephemeral (tests / CI / nuclear-\n revoke). Override the dir via GGUI_PERSISTENT_DIR.\n --seed-pool <dir> Load a read-only shared blueprint pool from a\n directory artifact (repeatable). Blueprints in it\n are reused by exact contract match, after your own.\n --help, -h Show this help.\n\nAgent runtime:\n The default boots your agent alongside MCP. The agent's entry file\n comes from ggui.json:\n\n { \"agent\": { \"entry\": \"./agent.ts\" } }\n\n Supported extensions: .js / .mjs / .cjs (node), .ts / .tsx / .mts\n (node --import=tsx). No ggui.json, or no agent.entry, falls back\n to MCP-only with a warning. Malformed ggui.json or a bad entry\n is a hard error.\n\n Agent crashes after startup are logged; the MCP server keeps\n running. No auto-restart \u2014 compose that with your own supervisor.\n\nPersistent storage (default-on; opt-out via --ephemeral):\n By default `ggui serve` writes a small bundle under .ggui/persistent/\n (project-local if a ggui.json was resolved, else ~/.ggui/persistent/)\n so cached MCP Apps tokens, shortCodes, renders,\n vectors, and paired bearers survive a restart \u2014 claude.ai chat-history\n revisits keep working.\n\n Bundle layout:\n\n .ggui/persistent/\n \u251C\u2500\u2500 ws-token-secret.hex (HMAC, 0600)\n \u251C\u2500\u2500 short-codes.sqlite (signed render-URL resolution)\n \u251C\u2500\u2500 sessions.sqlite (GguiSessionStore \u2014 renders + event history)\n \u251C\u2500\u2500 vectors.sqlite (RAG corpus)\n \u2514\u2500\u2500 keys.json (paired bearers)\n\n Override the dir with `GGUI_PERSISTENT_DIR`. Pass `--ephemeral` to\n skip the bundle entirely (tests, CI loops, nuclear-revoke).\n\n Explicit ggui.json#storage declarations always win \u2014 declare\n `{ \"renders\": { \"driver\": \"memory\" } }` to opt renders back to\n in-memory while keeping other surfaces persistent. Custom sqlite\n paths via ggui.json#storage are honored verbatim:\n\n {\n \"storage\": {\n \"renders\": { \"driver\": \"sqlite\", \"path\": \"./ggui-sessions.sqlite\" },\n \"vectors\": { \"driver\": \"sqlite\", \"path\": \"./ggui-vectors.sqlite\" },\n \"threads\": { \"driver\": \"sqlite\", \"path\": \"./ggui-threads.sqlite\" }\n }\n }\n\n Threads: the persistent-chat route family (/threads) is opt-in.\n Absent `storage.threads` leaves the routes unmounted \u2014 pairs\n with Portal's self-hosted origins only when declared. Driver\n semantics:\n - `driver: \"sqlite\"` \u2014 durable. Threads survive restart.\n /ggui/health reports `threads.durability: \"durable\"`;\n Portal hides its non-durable caveat.\n - `driver: \"memory\"` \u2014 routes mount but data is lost on\n restart. /ggui/health reports `threads.durability:\n \"ephemeral\"`; Portal shows its caveat.\n\n Paths resolve relative to the ggui.json directory. The sqlite\n driver needs `better-sqlite3` installed in your project.\n\nRecommended setups:\n\n Local-only smoke (no tunnel, no remote MCP host):\n ggui serve\n\n claude.ai custom connector (over a public tunnel):\n 1. Tunnel: cloudflared tunnel --url http://localhost:6781\n 2. ggui serve --oauth \\\n --public-base-url https://<tunnel>.trycloudflare.com\n 3. Note PAIR_CODE from boot. Visit the landing page (the public URL\n above), complete pairing, save the bearer.\n 4. claude.ai \u2192 Settings \u2192 Connectors \u2192 Add custom connector.\n URL: https://<tunnel>.trycloudflare.com/mcp\n Client ID / Secret: leave empty (server uses Dynamic Client\n Registration; no pre-shared secret needed).\n 5. Click Connect \u2192 claude.ai redirects you to a paste-key page.\n Paste the bearer from step 3. Done.\n\n Quick local-dev WITHOUT auth (NEVER over a public tunnel):\n ggui serve --dev-allow-all\n\nCurrent limits:\n - Strict-auth only: /mcp rejects any bearer that isn't pair-minted.\n The CLI pre-mints one pairing code on boot (printed as\n `PAIR_CODE <code>` and shown in the banner + on the landing\n page). Complete `POST /pair {code, deviceName}` to receive a\n bearer you can use with MCP. Embed @ggui-ai/mcp-server in your\n own entrypoint to inject a different AuthAdapter (OIDC, Cognito,\n etc.) for production.\n - Single-user: every request scopes to one `builder` app id.\n";
|
|
541
541
|
//# sourceMappingURL=serve-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-command.d.ts","sourceRoot":"","sources":["../src/serve-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAEjB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;;;;;OAUG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;;;;;;;OASG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;;;;;;;;;;;;;;OAeG;IACH,eAAe,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAC;IAC1E;;;;;;;;;;OAUG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;;;OASG;IACH,Q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AM,IAAI,EACnB,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,GACxB,IAAI,CAAC;CACT;AAED,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,WAAW,GAAG,eAAe,CAAC,CAAC,CAAC;IAC1F,0DAA0D;IAC1D,QAAQ,CAAC,cAAc,EAAE,mBAAmB,CAAC;IAC7C;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,qBAAqB,CAAC;IACvC,gFAAgF;IAChF,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,iCAAiC;IACjC,QAAQ,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAChD;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,mBAAmB,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAyJrE;AAED,eAAO,MAAM,UAAU,2tUA8LtB,CAAC"}
|
package/dist/serve-command.js
CHANGED
|
@@ -582,7 +582,7 @@ Agent runtime:
|
|
|
582
582
|
Persistent storage (default-on; opt-out via --ephemeral):
|
|
583
583
|
By default \`ggui serve\` writes a small bundle under .ggui/persistent/
|
|
584
584
|
(project-local if a ggui.json was resolved, else ~/.ggui/persistent/)
|
|
585
|
-
so cached MCP Apps tokens,
|
|
585
|
+
so cached MCP Apps tokens, shortCodes, renders,
|
|
586
586
|
vectors, and paired bearers survive a restart — claude.ai chat-history
|
|
587
587
|
revisits keep working.
|
|
588
588
|
|
|
@@ -590,7 +590,6 @@ Persistent storage (default-on; opt-out via --ephemeral):
|
|
|
590
590
|
|
|
591
591
|
.ggui/persistent/
|
|
592
592
|
├── ws-token-secret.hex (HMAC, 0600)
|
|
593
|
-
├── render-signer-secret.hex (HMAC, 0600)
|
|
594
593
|
├── short-codes.sqlite (signed render-URL resolution)
|
|
595
594
|
├── sessions.sqlite (GguiSessionStore — renders + event history)
|
|
596
595
|
├── vectors.sqlite (RAG corpus)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "The `ggui` CLI — run the ggui protocol locally: dev server, self-hosted MCP server, and gadget / blueprint authoring. End-to-end OSS and self-hosted workflows; no account required.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ggui",
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
"@noble/hashes": "^1.6.0",
|
|
38
38
|
"esbuild": "^0.28.2",
|
|
39
39
|
"zod": "^4.3.6",
|
|
40
|
-
"@ggui-ai/
|
|
41
|
-
"@ggui-ai/
|
|
42
|
-
"@ggui-ai/dev-stack": "0.
|
|
43
|
-
"@ggui-ai/
|
|
44
|
-
"@ggui-ai/
|
|
45
|
-
"@ggui-ai/
|
|
46
|
-
"@ggui-ai/mcp-server-core": "0.
|
|
47
|
-
"@ggui-ai/mcp-server": "0.
|
|
48
|
-
"@ggui-ai/
|
|
49
|
-
"@ggui-ai/
|
|
50
|
-
"@ggui-ai/protocol": "0.
|
|
51
|
-
"@ggui-ai/
|
|
52
|
-
"@ggui-ai/
|
|
53
|
-
"@ggui-ai/ui-
|
|
54
|
-
"@ggui-ai/
|
|
55
|
-
"@ggui-ai/
|
|
40
|
+
"@ggui-ai/agent-runtime": "0.26.0",
|
|
41
|
+
"@ggui-ai/design": "0.26.0",
|
|
42
|
+
"@ggui-ai/dev-stack": "0.26.0",
|
|
43
|
+
"@ggui-ai/gadget-signing": "0.26.0",
|
|
44
|
+
"@ggui-ai/embedding-local": "0.26.0",
|
|
45
|
+
"@ggui-ai/mcp-server": "0.26.0",
|
|
46
|
+
"@ggui-ai/mcp-server-core": "0.26.0",
|
|
47
|
+
"@ggui-ai/mcp-server-handlers": "0.26.0",
|
|
48
|
+
"@ggui-ai/preview-a2ui": "0.26.0",
|
|
49
|
+
"@ggui-ai/project-config": "0.26.0",
|
|
50
|
+
"@ggui-ai/protocol": "0.26.0",
|
|
51
|
+
"@ggui-ai/iframe-runtime": "0.26.0",
|
|
52
|
+
"@ggui-ai/registry-core": "0.26.0",
|
|
53
|
+
"@ggui-ai/ui-gen": "0.26.0",
|
|
54
|
+
"@ggui-ai/artifact-manifest": "0.26.0",
|
|
55
|
+
"@ggui-ai/ui-registry": "0.26.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/node": "^24.0.0",
|