@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.
- package/dist/templates/claude-agent-sdk/guuey.json +2 -1
- package/dist/templates/claude-agent-sdk/package.json +3 -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/guuey.json +2 -1
- package/dist/templates/google-adk/package.json +2 -2
- package/dist/templates/google-adk/web/package.json +1 -1
- package/dist/templates/openai-agents-sdk/guuey.json +5 -0
- package/dist/templates/openai-agents-sdk/package.json +3 -3
- package/dist/templates/openai-agents-sdk/src/agent-config.ts +26 -19
- package/dist/templates/openai-agents-sdk/web/package.json +1 -1
- package/package.json +3 -2
|
@@ -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.
|
|
14
|
-
"@guuey/worker": "0.
|
|
13
|
+
"@guuey/config": "0.2.0",
|
|
14
|
+
"@guuey/worker": "0.2.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@guuey/cli": "0.
|
|
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
|
|
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
|
|
|
@@ -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" }
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@openai/agents": "^0.12.0",
|
|
13
|
-
"@guuey/config": "0.
|
|
14
|
-
"@guuey/worker": "0.
|
|
13
|
+
"@guuey/config": "0.2.0",
|
|
14
|
+
"@guuey/worker": "0.2.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@guuey/cli": "0.
|
|
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
|
|
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
|
|
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"
|