@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.
- package/README.md +10 -0
- package/dist/templates/claude-agent-sdk/AGENTS.md +135 -0
- package/dist/templates/claude-agent-sdk/README.md +45 -15
- package/dist/templates/claude-agent-sdk/guuey.json +2 -1
- package/dist/templates/claude-agent-sdk/mcps/todo/package.json +1 -1
- package/dist/templates/claude-agent-sdk/mcps/todo/tsup.config.ts +14 -0
- package/dist/templates/claude-agent-sdk/package.json +3 -3
- package/dist/templates/claude-agent-sdk/scripts/dev.mjs +4 -3
- package/dist/templates/claude-agent-sdk/src/agent-config.ts +26 -19
- package/dist/templates/claude-agent-sdk/web/package.json +1 -1
- package/dist/templates/google-adk/AGENTS.md +135 -0
- package/dist/templates/google-adk/README.md +33 -17
- package/dist/templates/google-adk/guuey.json +3 -2
- package/dist/templates/google-adk/mcps/todo/package.json +1 -1
- package/dist/templates/google-adk/mcps/todo/tsup.config.ts +14 -0
- package/dist/templates/google-adk/package.json +2 -2
- package/dist/templates/google-adk/scripts/dev.mjs +4 -3
- package/dist/templates/google-adk/src/agent.ts +6 -2
- package/dist/templates/google-adk/web/package.json +1 -1
- package/dist/templates/mcp-base/src/server.ts +49 -0
- package/dist/templates/openai-agents-sdk/AGENTS.md +135 -0
- package/dist/templates/openai-agents-sdk/README.md +45 -15
- package/dist/templates/openai-agents-sdk/guuey.json +18 -4
- package/dist/templates/openai-agents-sdk/mcps/todo/package.json +1 -1
- package/dist/templates/openai-agents-sdk/mcps/todo/tsup.config.ts +14 -0
- package/dist/templates/openai-agents-sdk/package.json +3 -3
- package/dist/templates/openai-agents-sdk/scripts/dev.mjs +4 -3
- package/dist/templates/openai-agents-sdk/src/agent-config.ts +26 -19
- package/dist/templates/openai-agents-sdk/tsup.config.ts +9 -2
- package/dist/templates/openai-agents-sdk/web/package.json +1 -1
- 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
|
|
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
|
|
30
|
-
*
|
|
31
|
-
* `{url, transport, headers}` per `@guuey/
|
|
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
|
-
/**
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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: {
|
|
4
|
+
entry: { worker: "src/worker.ts" },
|
|
5
5
|
format: ["esm"],
|
|
6
6
|
outDir: ".",
|
|
7
7
|
clean: false,
|
|
8
|
-
|
|
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
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guuey/create-agentic-app",
|
|
3
|
-
"version": "0.
|
|
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.
|
|
25
|
+
"@guuey/config": "0.2.0",
|
|
26
|
+
"@guuey/worker": "0.2.0"
|
|
26
27
|
},
|
|
27
28
|
"publishConfig": {
|
|
28
29
|
"access": "public"
|