@guuey/create-agentic-app 0.1.3 → 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.
Files changed (31) hide show
  1. package/README.md +10 -0
  2. package/dist/templates/claude-agent-sdk/AGENTS.md +135 -0
  3. package/dist/templates/claude-agent-sdk/README.md +45 -15
  4. package/dist/templates/claude-agent-sdk/guuey.json +2 -1
  5. package/dist/templates/claude-agent-sdk/mcps/todo/package.json +1 -1
  6. package/dist/templates/claude-agent-sdk/mcps/todo/tsup.config.ts +14 -0
  7. package/dist/templates/claude-agent-sdk/package.json +3 -3
  8. package/dist/templates/claude-agent-sdk/scripts/dev.mjs +4 -3
  9. package/dist/templates/claude-agent-sdk/src/agent-config.ts +26 -19
  10. package/dist/templates/claude-agent-sdk/web/package.json +1 -1
  11. package/dist/templates/google-adk/AGENTS.md +135 -0
  12. package/dist/templates/google-adk/README.md +33 -17
  13. package/dist/templates/google-adk/guuey.json +3 -2
  14. package/dist/templates/google-adk/mcps/todo/package.json +1 -1
  15. package/dist/templates/google-adk/mcps/todo/tsup.config.ts +14 -0
  16. package/dist/templates/google-adk/package.json +2 -2
  17. package/dist/templates/google-adk/scripts/dev.mjs +4 -3
  18. package/dist/templates/google-adk/src/agent.ts +6 -2
  19. package/dist/templates/google-adk/web/package.json +1 -1
  20. package/dist/templates/mcp-base/src/server.ts +49 -0
  21. package/dist/templates/openai-agents-sdk/AGENTS.md +135 -0
  22. package/dist/templates/openai-agents-sdk/README.md +45 -15
  23. package/dist/templates/openai-agents-sdk/guuey.json +18 -4
  24. package/dist/templates/openai-agents-sdk/mcps/todo/package.json +1 -1
  25. package/dist/templates/openai-agents-sdk/mcps/todo/tsup.config.ts +14 -0
  26. package/dist/templates/openai-agents-sdk/package.json +3 -3
  27. package/dist/templates/openai-agents-sdk/scripts/dev.mjs +4 -3
  28. package/dist/templates/openai-agents-sdk/src/agent-config.ts +26 -19
  29. package/dist/templates/openai-agents-sdk/tsup.config.ts +9 -2
  30. package/dist/templates/openai-agents-sdk/web/package.json +1 -1
  31. package/package.json +3 -2
@@ -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
 
@@ -1,9 +1,16 @@
1
1
  import { defineConfig } from "tsup";
2
2
 
3
3
  export default defineConfig({
4
- entry: { "guuey.worker": "src/worker.ts" },
4
+ entry: { worker: "src/worker.ts" },
5
5
  format: ["esm"],
6
6
  outDir: ".",
7
7
  clean: false,
8
- noExternal: [/./], // bundle everything the deploy tarball must be runnable via `node guuey.worker.js`
8
+ // Dependencies stay EXTERNAL (tsup's default): @openai/agents' dependency
9
+ // tree is not ESM-bundle-safe (debug's dynamic require("tty"); circular
10
+ // class hierarchies in its MCP module — both crash a noExternal bundle at
11
+ // boot, caught by the first live openai pod gate). The platform installs
12
+ // deps from the lockfile at image-build time — the same registry-install
13
+ // path the google-adk graceful lane uses. The output is `worker.js` (via
14
+ // guuey.json#worker): the `guuey.worker.js` name specifically means
15
+ // "self-contained, skip install" to the platform's image build.
9
16
  });
@@ -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.3",
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.1"
25
+ "@guuey/config": "0.2.0",
26
+ "@guuey/worker": "0.2.0"
26
27
  },
27
28
  "publishConfig": {
28
29
  "access": "public"