@guuey/create-agentic-app 0.1.4 → 0.2.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.
@@ -6,7 +6,8 @@
6
6
  "model": "claude-sonnet-5",
7
7
  "systemPrompt": { "file": "prompts/system.md" },
8
8
  "mcpServers": {
9
- "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 }
9
+ "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 },
10
+ "ggui": { "kind": "external", "url": "https://mcp.ggui.ai", "transport": "http" }
10
11
  }
11
12
  },
12
13
  "ggui": { "configFile": "./ggui/ggui.json" }
@@ -10,11 +10,11 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@anthropic-ai/claude-agent-sdk": "^0.3.199",
13
- "@guuey/config": "0.1.2",
14
- "@guuey/worker": "0.1.1"
13
+ "@guuey/config": "0.2.0",
14
+ "@guuey/worker": "0.2.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@guuey/cli": "0.1.4",
17
+ "@guuey/cli": "0.2.0",
18
18
  "tsup": "^8.5.0",
19
19
  "tsx": "^4.19.0",
20
20
  "typescript": "^5.8.0"
@@ -7,7 +7,7 @@
7
7
  import { readFileSync } from "node:fs";
8
8
  import { join } from "node:path";
9
9
  import { parseGuueyJson, type GuueyAgent } from "@guuey/config";
10
- import type { Invoke } from "@guuey/worker";
10
+ import { listCredentials, type Invoke } from "@guuey/worker";
11
11
 
12
12
  /** GUUEY_AGENT_SNAPSHOT (set by the platform pod and by `guuey dev`) wins; guuey.json is the fallback. */
13
13
  export function loadAgent(invoke: Invoke): GuueyAgent {
@@ -26,9 +26,9 @@ export function systemPrompt(invoke: Invoke, agent: GuueyAgent): string | undefi
26
26
 
27
27
  /**
28
28
  * One resolved MCP endpoint this worker may connect to. `transport` rides
29
- * alongside `url`/`headers` (not hardcoded to `"http"`) because a federation
30
- * credential file — `<session>/.guuey/credentials/<name>.json`, shape
31
- * `{url, transport, headers}` per `@guuey/host`'s `CredentialFile` — may
29
+ * alongside `url`/`headers` (not hardcoded to `"http"`) because a credential
30
+ * file — `<session>/.guuey/credentials/<name>.json`, shape
31
+ * `{url, transport, headers}` per `@guuey/worker`'s `CredentialFile` — may
32
32
  * resolve a server onto the `sse` transport arm.
33
33
  */
34
34
  export interface McpEndpoint {
@@ -37,26 +37,33 @@ export interface McpEndpoint {
37
37
  headers: Record<string, string>;
38
38
  }
39
39
 
40
- /** Lowered entries are `external`; federation credentials (if any) arrive as per-session files. */
40
+ /**
41
+ * Endpoint set = broker-written credential DIRECTORY (source of truth for
42
+ * federated + platform-injected servers — incl. guuey-memory/guuey-profile,
43
+ * invisible to the declared map by design) ∪ declared external entries that
44
+ * have no credential file (plain endpoints, static headers). Credential wins
45
+ * per name. One honest log line names both sets — no silent fallback.
46
+ */
41
47
  export function mcpEndpoints(invoke: Invoke, agent: GuueyAgent): Record<string, McpEndpoint> {
42
48
  const out: Record<string, McpEndpoint> = {};
43
49
  for (const [name, entry] of Object.entries(agent.mcpServers ?? {})) {
50
+ if (entry === false) continue; // `ggui: false` is the generative-UI opt-out, not a server entry
44
51
  if (entry.kind !== "external") continue; // hosted/proxied are lowered to external before a worker ever runs
45
- let url = entry.url;
46
- let transport: "http" | "sse" = entry.transport ?? "http";
47
- let headers: Record<string, string> = { ...(entry.headers ?? {}) };
48
- try {
49
- const cred = JSON.parse(
50
- readFileSync(join(invoke.fs.session, ".guuey", "credentials", `${name}.json`), "utf8")
51
- ) as { url: string; transport: "http" | "sse"; headers: Record<string, string> };
52
- url = cred.url;
53
- transport = cred.transport;
54
- headers = cred.headers;
55
- } catch {
56
- // no credential file — plain external endpoint; static headers apply
57
- }
58
- out[name] = { url, transport, headers };
52
+ out[name] = {
53
+ url: entry.url,
54
+ transport: entry.transport ?? "http",
55
+ headers: { ...(entry.headers ?? {}) },
56
+ };
59
57
  }
58
+ const creds = listCredentials(invoke.fs)();
59
+ for (const { name, cred } of creds) {
60
+ out[name] = { url: cred.url, transport: cred.transport, headers: cred.headers };
61
+ }
62
+ const credentialed = creds.map((c) => c.name);
63
+ const declaredOnly = Object.keys(out).filter((n) => !credentialed.includes(n));
64
+ console.log(
65
+ `[guuey] mcp endpoints: credentialed=[${credentialed.join(",")}] declared-only=[${declaredOnly.join(",")}]`
66
+ );
60
67
  return out;
61
68
  }
62
69
 
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@mcp-ui/client": "^7.1.1",
13
- "@silverprotocol/core": "0.3.2",
13
+ "@silverprotocol/core": "0.4.1",
14
14
  "react": "^19.0.0",
15
15
  "react-dom": "^19.0.0"
16
16
  },
@@ -7,7 +7,8 @@
7
7
  "entry": "agent.js",
8
8
  "systemPrompt": { "file": "prompts/system.md" },
9
9
  "mcpServers": {
10
- "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 }
10
+ "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 },
11
+ "ggui": { "kind": "external", "url": "https://mcp.ggui.ai", "transport": "http" }
11
12
  }
12
13
  },
13
14
  "ggui": { "configFile": "./ggui/ggui.json" }
@@ -13,10 +13,10 @@
13
13
  "zod": "^4.2.1"
14
14
  },
15
15
  "devDependencies": {
16
- "@guuey/cli": "0.1.4",
16
+ "@guuey/cli": "0.2.0",
17
17
  "tsup": "^8.5.0",
18
18
  "tsx": "^4.19.0",
19
19
  "typescript": "^5.8.0",
20
- "@guuey/config": "0.1.2"
20
+ "@guuey/config": "0.2.0"
21
21
  }
22
22
  }
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@mcp-ui/client": "^7.1.1",
13
- "@silverprotocol/core": "0.3.2",
13
+ "@silverprotocol/core": "0.4.1",
14
14
  "react": "^19.0.0",
15
15
  "react-dom": "^19.0.0"
16
16
  },
@@ -13,6 +13,11 @@
13
13
  "kind": "colocated",
14
14
  "source": "./mcps/todo",
15
15
  "devPort": 6782
16
+ },
17
+ "ggui": {
18
+ "kind": "external",
19
+ "url": "https://mcp.ggui.ai",
20
+ "transport": "http"
16
21
  }
17
22
  }
18
23
  },
@@ -10,11 +10,11 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@openai/agents": "^0.12.0",
13
- "@guuey/config": "0.1.2",
14
- "@guuey/worker": "0.1.1"
13
+ "@guuey/config": "0.2.0",
14
+ "@guuey/worker": "0.2.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@guuey/cli": "0.1.4",
17
+ "@guuey/cli": "0.2.0",
18
18
  "tsup": "^8.5.0",
19
19
  "tsx": "^4.19.0",
20
20
  "typescript": "^5.8.0"
@@ -7,7 +7,7 @@
7
7
  import { readFileSync } from "node:fs";
8
8
  import { join } from "node:path";
9
9
  import { parseGuueyJson, type GuueyAgent } from "@guuey/config";
10
- import type { Invoke } from "@guuey/worker";
10
+ import { listCredentials, type Invoke } from "@guuey/worker";
11
11
 
12
12
  /** GUUEY_AGENT_SNAPSHOT (set by the platform pod and by `guuey dev`) wins; guuey.json is the fallback. */
13
13
  export function loadAgent(invoke: Invoke): GuueyAgent {
@@ -26,9 +26,9 @@ export function systemPrompt(invoke: Invoke, agent: GuueyAgent): string | undefi
26
26
 
27
27
  /**
28
28
  * One resolved MCP endpoint this worker may connect to. `transport` rides
29
- * alongside `url`/`headers` (not hardcoded to `"http"`) because a federation
30
- * credential file — `<session>/.guuey/credentials/<name>.json`, shape
31
- * `{url, transport, headers}` per `@guuey/host`'s `CredentialFile` — may
29
+ * alongside `url`/`headers` (not hardcoded to `"http"`) because a credential
30
+ * file — `<session>/.guuey/credentials/<name>.json`, shape
31
+ * `{url, transport, headers}` per `@guuey/worker`'s `CredentialFile` — may
32
32
  * resolve a server onto the `sse` transport arm.
33
33
  */
34
34
  export interface McpEndpoint {
@@ -37,26 +37,33 @@ export interface McpEndpoint {
37
37
  headers: Record<string, string>;
38
38
  }
39
39
 
40
- /** Lowered entries are `external`; federation credentials (if any) arrive as per-session files. */
40
+ /**
41
+ * Endpoint set = broker-written credential DIRECTORY (source of truth for
42
+ * federated + platform-injected servers — incl. guuey-memory/guuey-profile,
43
+ * invisible to the declared map by design) ∪ declared external entries that
44
+ * have no credential file (plain endpoints, static headers). Credential wins
45
+ * per name. One honest log line names both sets — no silent fallback.
46
+ */
41
47
  export function mcpEndpoints(invoke: Invoke, agent: GuueyAgent): Record<string, McpEndpoint> {
42
48
  const out: Record<string, McpEndpoint> = {};
43
49
  for (const [name, entry] of Object.entries(agent.mcpServers ?? {})) {
50
+ if (entry === false) continue; // `ggui: false` is the generative-UI opt-out, not a server entry
44
51
  if (entry.kind !== "external") continue; // hosted/proxied are lowered to external before a worker ever runs
45
- let url = entry.url;
46
- let transport: "http" | "sse" = entry.transport ?? "http";
47
- let headers: Record<string, string> = { ...(entry.headers ?? {}) };
48
- try {
49
- const cred = JSON.parse(
50
- readFileSync(join(invoke.fs.session, ".guuey", "credentials", `${name}.json`), "utf8")
51
- ) as { url: string; transport: "http" | "sse"; headers: Record<string, string> };
52
- url = cred.url;
53
- transport = cred.transport;
54
- headers = cred.headers;
55
- } catch {
56
- // no credential file — plain external endpoint; static headers apply
57
- }
58
- out[name] = { url, transport, headers };
52
+ out[name] = {
53
+ url: entry.url,
54
+ transport: entry.transport ?? "http",
55
+ headers: { ...(entry.headers ?? {}) },
56
+ };
59
57
  }
58
+ const creds = listCredentials(invoke.fs)();
59
+ for (const { name, cred } of creds) {
60
+ out[name] = { url: cred.url, transport: cred.transport, headers: cred.headers };
61
+ }
62
+ const credentialed = creds.map((c) => c.name);
63
+ const declaredOnly = Object.keys(out).filter((n) => !credentialed.includes(n));
64
+ console.log(
65
+ `[guuey] mcp endpoints: credentialed=[${credentialed.join(",")}] declared-only=[${declaredOnly.join(",")}]`
66
+ );
60
67
  return out;
61
68
  }
62
69
 
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@mcp-ui/client": "^7.1.1",
13
- "@silverprotocol/core": "0.3.2",
13
+ "@silverprotocol/core": "0.4.1",
14
14
  "react": "^19.0.0",
15
15
  "react-dom": "^19.0.0"
16
16
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guuey/create-agentic-app",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "Scaffold a guuey agentic app: code-mode agent + custom MCP + ggui + web, local pnpm dev, one-command guuey deploy.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,7 +22,8 @@
22
22
  "tsup": "^8.5.0",
23
23
  "typescript": "^5.8.0",
24
24
  "vitest": "^3.2.4",
25
- "@guuey/config": "0.1.2"
25
+ "@guuey/config": "0.2.0",
26
+ "@guuey/worker": "0.2.0"
26
27
  },
27
28
  "publishConfig": {
28
29
  "access": "public"