@koda-sl/baker-bridge 0.116.0 → 0.117.0-dev.2a54c32e7
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 +24 -2
- package/dist/broker/baker-api.d.ts +23 -0
- package/dist/broker/baker-api.d.ts.map +1 -0
- package/dist/broker/baker-api.js +55 -0
- package/dist/broker/baker-api.js.map +1 -0
- package/dist/broker/broker-client.d.ts +10 -0
- package/dist/broker/broker-client.d.ts.map +1 -0
- package/dist/broker/broker-client.js +60 -0
- package/dist/broker/broker-client.js.map +1 -0
- package/dist/broker/ca.d.ts +38 -0
- package/dist/broker/ca.d.ts.map +1 -0
- package/dist/broker/ca.js +80 -0
- package/dist/broker/ca.js.map +1 -0
- package/dist/broker/ca.test.d.ts +2 -0
- package/dist/broker/ca.test.d.ts.map +1 -0
- package/dist/broker/ca.test.js +58 -0
- package/dist/broker/ca.test.js.map +1 -0
- package/dist/broker/credential-cache.d.ts +24 -0
- package/dist/broker/credential-cache.d.ts.map +1 -0
- package/dist/broker/credential-cache.js +69 -0
- package/dist/broker/credential-cache.js.map +1 -0
- package/dist/broker/credential-cache.test.d.ts +2 -0
- package/dist/broker/credential-cache.test.d.ts.map +1 -0
- package/dist/broker/credential-cache.test.js +120 -0
- package/dist/broker/credential-cache.test.js.map +1 -0
- package/dist/broker/credential-text.d.ts +45 -0
- package/dist/broker/credential-text.d.ts.map +1 -0
- package/dist/broker/credential-text.js +103 -0
- package/dist/broker/credential-text.js.map +1 -0
- package/dist/broker/credential-text.test.d.ts +2 -0
- package/dist/broker/credential-text.test.d.ts.map +1 -0
- package/dist/broker/credential-text.test.js +54 -0
- package/dist/broker/credential-text.test.js.map +1 -0
- package/dist/broker/env.d.ts +19 -0
- package/dist/broker/env.d.ts.map +1 -0
- package/dist/broker/env.js +16 -0
- package/dist/broker/env.js.map +1 -0
- package/dist/broker/main.d.ts +3 -0
- package/dist/broker/main.d.ts.map +1 -0
- package/dist/broker/main.js +51 -0
- package/dist/broker/main.js.map +1 -0
- package/dist/broker/proxy.d.ts +24 -0
- package/dist/broker/proxy.d.ts.map +1 -0
- package/dist/broker/proxy.integration.test.d.ts +2 -0
- package/dist/broker/proxy.integration.test.d.ts.map +1 -0
- package/dist/broker/proxy.integration.test.js +201 -0
- package/dist/broker/proxy.integration.test.js.map +1 -0
- package/dist/broker/proxy.js +147 -0
- package/dist/broker/proxy.js.map +1 -0
- package/dist/broker/rewrite.d.ts +44 -0
- package/dist/broker/rewrite.d.ts.map +1 -0
- package/dist/broker/rewrite.js +291 -0
- package/dist/broker/rewrite.js.map +1 -0
- package/dist/broker/rewrite.test.d.ts +2 -0
- package/dist/broker/rewrite.test.d.ts.map +1 -0
- package/dist/broker/rewrite.test.js +171 -0
- package/dist/broker/rewrite.test.js.map +1 -0
- package/dist/broker/socket-service.d.ts +18 -0
- package/dist/broker/socket-service.d.ts.map +1 -0
- package/dist/broker/socket-service.js +103 -0
- package/dist/broker/socket-service.js.map +1 -0
- package/dist/broker/socket-service.test.d.ts +2 -0
- package/dist/broker/socket-service.test.d.ts.map +1 -0
- package/dist/broker/socket-service.test.js +73 -0
- package/dist/broker/socket-service.test.js.map +1 -0
- package/dist/broker/token-bucket.d.ts +9 -0
- package/dist/broker/token-bucket.d.ts.map +1 -0
- package/dist/broker/token-bucket.js +18 -0
- package/dist/broker/token-bucket.js.map +1 -0
- package/dist/broker/usage-reporter.d.ts +18 -0
- package/dist/broker/usage-reporter.d.ts.map +1 -0
- package/dist/broker/usage-reporter.js +31 -0
- package/dist/broker/usage-reporter.js.map +1 -0
- package/dist/broker/usage-reporter.test.d.ts +2 -0
- package/dist/broker/usage-reporter.test.d.ts.map +1 -0
- package/dist/broker/usage-reporter.test.js +20 -0
- package/dist/broker/usage-reporter.test.js.map +1 -0
- package/dist/hono/agent-session.d.ts +3 -0
- package/dist/hono/agent-session.d.ts.map +1 -1
- package/dist/hono/agent-session.js +15 -0
- package/dist/hono/agent-session.js.map +1 -1
- package/dist/hono/agent.d.ts +2 -0
- package/dist/hono/agent.d.ts.map +1 -1
- package/dist/hono/agent.js +11 -2
- package/dist/hono/agent.js.map +1 -1
- package/dist/hono/avatar-casting.d.ts +1 -0
- package/dist/hono/avatar-casting.d.ts.map +1 -1
- package/dist/hono/avatar-casting.js +18 -4
- package/dist/hono/avatar-casting.js.map +1 -1
- package/dist/hono/avatar-casting.test.js +5 -0
- package/dist/hono/avatar-casting.test.js.map +1 -1
- package/dist/hono/baker-ui-tool-schemas.test.js +30 -4
- package/dist/hono/baker-ui-tool-schemas.test.js.map +1 -1
- package/dist/hono/blocking-card.d.ts +12 -0
- package/dist/hono/blocking-card.d.ts.map +1 -0
- package/dist/hono/blocking-card.js +12 -0
- package/dist/hono/blocking-card.js.map +1 -0
- package/dist/hono/bridge-job.d.ts +42 -2
- package/dist/hono/bridge-job.d.ts.map +1 -1
- package/dist/hono/bridge-job.js +141 -7
- package/dist/hono/bridge-job.js.map +1 -1
- package/dist/hono/bridge-job.test.js +243 -1
- package/dist/hono/bridge-job.test.js.map +1 -1
- package/dist/hono/connection-input.d.ts +158 -12
- package/dist/hono/connection-input.d.ts.map +1 -1
- package/dist/hono/connection-input.js +155 -15
- package/dist/hono/connection-input.js.map +1 -1
- package/dist/hono/connection-input.test.js +89 -9
- package/dist/hono/connection-input.test.js.map +1 -1
- package/dist/hono/convex.d.ts +8 -0
- package/dist/hono/convex.d.ts.map +1 -1
- package/dist/hono/convex.js +8 -0
- package/dist/hono/convex.js.map +1 -1
- package/dist/hono/credential-input.d.ts +39 -0
- package/dist/hono/credential-input.d.ts.map +1 -0
- package/dist/hono/credential-input.js +78 -0
- package/dist/hono/credential-input.js.map +1 -0
- package/dist/hono/credential-scrub.d.ts +41 -0
- package/dist/hono/credential-scrub.d.ts.map +1 -0
- package/dist/hono/credential-scrub.js +152 -0
- package/dist/hono/credential-scrub.js.map +1 -0
- package/dist/hono/credential-scrub.test.d.ts +2 -0
- package/dist/hono/credential-scrub.test.d.ts.map +1 -0
- package/dist/hono/credential-scrub.test.js +105 -0
- package/dist/hono/credential-scrub.test.js.map +1 -0
- package/dist/hono/flow-input.d.ts.map +1 -1
- package/dist/hono/flow-input.js +3 -2
- package/dist/hono/flow-input.js.map +1 -1
- package/dist/hono/latitude-telemetry.d.ts.map +1 -1
- package/dist/hono/latitude-telemetry.js +8 -2
- package/dist/hono/latitude-telemetry.js.map +1 -1
- package/dist/hono/mcp-servers.d.ts +8 -1
- package/dist/hono/mcp-servers.d.ts.map +1 -1
- package/dist/hono/mcp-servers.js +17 -6
- package/dist/hono/mcp-servers.js.map +1 -1
- package/dist/hono/mcp-servers.test.js +25 -0
- package/dist/hono/mcp-servers.test.js.map +1 -1
- package/dist/hono/prompt-context.d.ts +8 -1
- package/dist/hono/prompt-context.d.ts.map +1 -1
- package/dist/hono/prompt-context.js +45 -7
- package/dist/hono/prompt-context.js.map +1 -1
- package/dist/hono/prompt-context.test.js +35 -1
- package/dist/hono/prompt-context.test.js.map +1 -1
- package/dist/hono/relay.d.ts +10 -1
- package/dist/hono/relay.d.ts.map +1 -1
- package/dist/hono/relay.js +6 -0
- package/dist/hono/relay.js.map +1 -1
- package/dist/hono/server.d.ts.map +1 -1
- package/dist/hono/server.js +22 -0
- package/dist/hono/server.js.map +1 -1
- package/dist/hono/tag-input.d.ts +123 -3
- package/dist/hono/tag-input.d.ts.map +1 -1
- package/dist/hono/tag-input.js +27 -17
- package/dist/hono/tag-input.js.map +1 -1
- package/dist/hono/tag-input.test.js +19 -1
- package/dist/hono/tag-input.test.js.map +1 -1
- package/dist/hono/types.d.ts +8 -0
- package/dist/hono/types.d.ts.map +1 -1
- package/package.json +5 -2
|
@@ -12,11 +12,12 @@ export declare const CONNECTION_INPUT_TOOL_NAME = "mcp__baker_ui__request_connec
|
|
|
12
12
|
* backend: a platform live in one and missing from another is a door that
|
|
13
13
|
* looks open from one side only.
|
|
14
14
|
*/
|
|
15
|
-
export declare const CONNECTION_PLATFORMS: readonly ["google-ads", "linkedin", "meta", "google-analytics", "google-search-console", "google-tag-manager", "x-ads", "hubspot", "google-drive", "highlevel", "pipedrive", "calendly", "savvycal"];
|
|
15
|
+
export declare const CONNECTION_PLATFORMS: readonly ["google-ads", "linkedin", "meta", "google-analytics", "google-search-console", "google-tag-manager", "x-ads", "hubspot", "google-drive", "highlevel", "pipedrive", "calendly", "savvycal", "chatgpt-ads"];
|
|
16
16
|
export type ConnectionPlatform = (typeof CONNECTION_PLATFORMS)[number];
|
|
17
|
-
declare const connectionRequestShape: z.ZodObject<{
|
|
17
|
+
declare const connectionRequestShape: z.ZodUnion<readonly [z.ZodObject<{
|
|
18
18
|
platform: z.ZodEnum<{
|
|
19
19
|
calendly: "calendly";
|
|
20
|
+
"chatgpt-ads": "chatgpt-ads";
|
|
20
21
|
"google-ads": "google-ads";
|
|
21
22
|
"google-analytics": "google-analytics";
|
|
22
23
|
"google-drive": "google-drive";
|
|
@@ -32,11 +33,34 @@ declare const connectionRequestShape: z.ZodObject<{
|
|
|
32
33
|
}>;
|
|
33
34
|
reason: z.ZodString;
|
|
34
35
|
choose: z.ZodOptional<z.ZodLiteral<"media-folder">>;
|
|
35
|
-
|
|
36
|
+
pick: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
app: z.ZodString;
|
|
39
|
+
reason: z.ZodString;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
server: z.ZodObject<{
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
url: z.ZodString;
|
|
44
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
key: "key";
|
|
46
|
+
none: "none";
|
|
47
|
+
"sign-in": "sign-in";
|
|
48
|
+
}>>;
|
|
49
|
+
keyHeader: z.ZodOptional<z.ZodString>;
|
|
50
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
company: "company";
|
|
52
|
+
org: "org";
|
|
53
|
+
user: "user";
|
|
54
|
+
user_org: "user_org";
|
|
55
|
+
}>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
reason: z.ZodString;
|
|
58
|
+
}, z.core.$strip>]>;
|
|
36
59
|
export declare const connectionInputToolShape: {
|
|
37
|
-
connections: z.ZodArray<z.ZodObject<{
|
|
60
|
+
connections: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
38
61
|
platform: z.ZodEnum<{
|
|
39
62
|
calendly: "calendly";
|
|
63
|
+
"chatgpt-ads": "chatgpt-ads";
|
|
40
64
|
"google-ads": "google-ads";
|
|
41
65
|
"google-analytics": "google-analytics";
|
|
42
66
|
"google-drive": "google-drive";
|
|
@@ -52,13 +76,36 @@ export declare const connectionInputToolShape: {
|
|
|
52
76
|
}>;
|
|
53
77
|
reason: z.ZodString;
|
|
54
78
|
choose: z.ZodOptional<z.ZodLiteral<"media-folder">>;
|
|
55
|
-
|
|
79
|
+
pick: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
app: z.ZodString;
|
|
82
|
+
reason: z.ZodString;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
server: z.ZodObject<{
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
url: z.ZodString;
|
|
87
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
88
|
+
key: "key";
|
|
89
|
+
none: "none";
|
|
90
|
+
"sign-in": "sign-in";
|
|
91
|
+
}>>;
|
|
92
|
+
keyHeader: z.ZodOptional<z.ZodString>;
|
|
93
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
94
|
+
company: "company";
|
|
95
|
+
org: "org";
|
|
96
|
+
user: "user";
|
|
97
|
+
user_org: "user_org";
|
|
98
|
+
}>>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
reason: z.ZodString;
|
|
101
|
+
}, z.core.$strip>]>>;
|
|
56
102
|
resolution: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>>;
|
|
57
103
|
};
|
|
58
|
-
export declare const connectionInputResultSchema: z.
|
|
104
|
+
export declare const connectionInputResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
59
105
|
status: z.ZodLiteral<"connected">;
|
|
60
106
|
platform: z.ZodEnum<{
|
|
61
107
|
calendly: "calendly";
|
|
108
|
+
"chatgpt-ads": "chatgpt-ads";
|
|
62
109
|
"google-ads": "google-ads";
|
|
63
110
|
"google-analytics": "google-analytics";
|
|
64
111
|
"google-drive": "google-drive";
|
|
@@ -80,6 +127,7 @@ export declare const connectionInputResultSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
80
127
|
status: z.ZodLiteral<"declined">;
|
|
81
128
|
platform: z.ZodEnum<{
|
|
82
129
|
calendly: "calendly";
|
|
130
|
+
"chatgpt-ads": "chatgpt-ads";
|
|
83
131
|
"google-ads": "google-ads";
|
|
84
132
|
"google-analytics": "google-analytics";
|
|
85
133
|
"google-drive": "google-drive";
|
|
@@ -94,13 +142,43 @@ export declare const connectionInputResultSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
94
142
|
"x-ads": "x-ads";
|
|
95
143
|
}>;
|
|
96
144
|
reason: z.ZodOptional<z.ZodString>;
|
|
97
|
-
}, z.core.$strip
|
|
145
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
146
|
+
status: z.ZodLiteral<"connected">;
|
|
147
|
+
app: z.ZodString;
|
|
148
|
+
scope: z.ZodEnum<{
|
|
149
|
+
company: "company";
|
|
150
|
+
org: "org";
|
|
151
|
+
user: "user";
|
|
152
|
+
user_org: "user_org";
|
|
153
|
+
}>;
|
|
154
|
+
accountLabel: z.ZodOptional<z.ZodString>;
|
|
155
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
status: z.ZodLiteral<"declined">;
|
|
158
|
+
app: z.ZodString;
|
|
159
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
161
|
+
status: z.ZodLiteral<"connected">;
|
|
162
|
+
server: z.ZodString;
|
|
163
|
+
scope: z.ZodEnum<{
|
|
164
|
+
company: "company";
|
|
165
|
+
org: "org";
|
|
166
|
+
user: "user";
|
|
167
|
+
user_org: "user_org";
|
|
168
|
+
}>;
|
|
169
|
+
problem: z.ZodOptional<z.ZodString>;
|
|
170
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
171
|
+
status: z.ZodLiteral<"declined">;
|
|
172
|
+
server: z.ZodString;
|
|
173
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
174
|
+
}, z.core.$strip>]>;
|
|
98
175
|
export type ConnectionInputResult = z.infer<typeof connectionInputResultSchema>;
|
|
99
176
|
export declare const connectionInputResolutionSchema: z.ZodObject<{
|
|
100
|
-
results: z.ZodArray<z.
|
|
177
|
+
results: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
101
178
|
status: z.ZodLiteral<"connected">;
|
|
102
179
|
platform: z.ZodEnum<{
|
|
103
180
|
calendly: "calendly";
|
|
181
|
+
"chatgpt-ads": "chatgpt-ads";
|
|
104
182
|
"google-ads": "google-ads";
|
|
105
183
|
"google-analytics": "google-analytics";
|
|
106
184
|
"google-drive": "google-drive";
|
|
@@ -122,6 +200,7 @@ export declare const connectionInputResolutionSchema: z.ZodObject<{
|
|
|
122
200
|
status: z.ZodLiteral<"declined">;
|
|
123
201
|
platform: z.ZodEnum<{
|
|
124
202
|
calendly: "calendly";
|
|
203
|
+
"chatgpt-ads": "chatgpt-ads";
|
|
125
204
|
"google-ads": "google-ads";
|
|
126
205
|
"google-analytics": "google-analytics";
|
|
127
206
|
"google-drive": "google-drive";
|
|
@@ -136,9 +215,52 @@ export declare const connectionInputResolutionSchema: z.ZodObject<{
|
|
|
136
215
|
"x-ads": "x-ads";
|
|
137
216
|
}>;
|
|
138
217
|
reason: z.ZodOptional<z.ZodString>;
|
|
139
|
-
}, z.core.$strip
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
+
status: z.ZodLiteral<"connected">;
|
|
220
|
+
app: z.ZodString;
|
|
221
|
+
scope: z.ZodEnum<{
|
|
222
|
+
company: "company";
|
|
223
|
+
org: "org";
|
|
224
|
+
user: "user";
|
|
225
|
+
user_org: "user_org";
|
|
226
|
+
}>;
|
|
227
|
+
accountLabel: z.ZodOptional<z.ZodString>;
|
|
228
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
229
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
230
|
+
status: z.ZodLiteral<"declined">;
|
|
231
|
+
app: z.ZodString;
|
|
232
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
234
|
+
status: z.ZodLiteral<"connected">;
|
|
235
|
+
server: z.ZodString;
|
|
236
|
+
scope: z.ZodEnum<{
|
|
237
|
+
company: "company";
|
|
238
|
+
org: "org";
|
|
239
|
+
user: "user";
|
|
240
|
+
user_org: "user_org";
|
|
241
|
+
}>;
|
|
242
|
+
problem: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
244
|
+
status: z.ZodLiteral<"declined">;
|
|
245
|
+
server: z.ZodString;
|
|
246
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
247
|
+
}, z.core.$strip>]>>;
|
|
140
248
|
}, z.core.$strip>;
|
|
141
249
|
export type ConnectionInputResolution = z.infer<typeof connectionInputResolutionSchema>;
|
|
250
|
+
/**
|
|
251
|
+
* Whether the user connected something that brings MCP tools — an app or a
|
|
252
|
+
* server. Only then is the turn's server set reloaded: a platform is read with
|
|
253
|
+
* `baker` commands and adds no tool, and reloading for nothing would rewrite
|
|
254
|
+
* the tool list, and the prompt cache with it.
|
|
255
|
+
*/
|
|
256
|
+
export declare function toolsConnected(resolution: ConnectionInputResolution): boolean;
|
|
257
|
+
/**
|
|
258
|
+
* What the user connected that the reloaded server set does not carry, by the
|
|
259
|
+
* name the agent knows it by. An app arrives inside its scope's managed server
|
|
260
|
+
* (`composio_<scope>`), which is absent when the company has managed apps
|
|
261
|
+
* switched off or the session for them could not be made.
|
|
262
|
+
*/
|
|
263
|
+
export declare function connectedButNotLoaded(resolution: ConnectionInputResolution, loaded: readonly string[]): string[];
|
|
142
264
|
/** Parse-at-boundary for the resolution posted to `POST /connection-input-decision`. */
|
|
143
265
|
export declare function parseConnectionInputResolution(value: unknown): ConnectionInputResolution | null;
|
|
144
266
|
export type ConnectionInputRequest = z.infer<typeof connectionRequestShape>;
|
|
@@ -146,13 +268,15 @@ export type ConnectionInputRequest = z.infer<typeof connectionRequestShape>;
|
|
|
146
268
|
* `canUseTool` sees the RAW model input — MCP validation hasn't run yet — so the
|
|
147
269
|
* requests are normalized here before anything downstream trusts them. Unknown
|
|
148
270
|
* platforms (TikTok Ads, a hallucinated id) are dropped rather than shown as a
|
|
149
|
-
* dead tab.
|
|
271
|
+
* dead tab. The dashboard applies the same rules (`connectionRequestsFromToolInput`)
|
|
272
|
+
* because it resolves tabs by index into this list.
|
|
150
273
|
*/
|
|
151
274
|
export declare function normalizeConnectionInputToolInput(input: unknown): ConnectionInputRequest[];
|
|
152
275
|
export declare function createConnectionInputTool(): import("@anthropic-ai/claude-agent-sdk").SdkMcpToolDefinition<{
|
|
153
|
-
connections: z.ZodArray<z.ZodObject<{
|
|
276
|
+
connections: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
154
277
|
platform: z.ZodEnum<{
|
|
155
278
|
calendly: "calendly";
|
|
279
|
+
"chatgpt-ads": "chatgpt-ads";
|
|
156
280
|
"google-ads": "google-ads";
|
|
157
281
|
"google-analytics": "google-analytics";
|
|
158
282
|
"google-drive": "google-drive";
|
|
@@ -168,7 +292,29 @@ export declare function createConnectionInputTool(): import("@anthropic-ai/claud
|
|
|
168
292
|
}>;
|
|
169
293
|
reason: z.ZodString;
|
|
170
294
|
choose: z.ZodOptional<z.ZodLiteral<"media-folder">>;
|
|
171
|
-
|
|
295
|
+
pick: z.ZodOptional<z.ZodBoolean>;
|
|
296
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
297
|
+
app: z.ZodString;
|
|
298
|
+
reason: z.ZodString;
|
|
299
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
300
|
+
server: z.ZodObject<{
|
|
301
|
+
name: z.ZodString;
|
|
302
|
+
url: z.ZodString;
|
|
303
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
304
|
+
key: "key";
|
|
305
|
+
none: "none";
|
|
306
|
+
"sign-in": "sign-in";
|
|
307
|
+
}>>;
|
|
308
|
+
keyHeader: z.ZodOptional<z.ZodString>;
|
|
309
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
310
|
+
company: "company";
|
|
311
|
+
org: "org";
|
|
312
|
+
user: "user";
|
|
313
|
+
user_org: "user_org";
|
|
314
|
+
}>>;
|
|
315
|
+
}, z.core.$strip>;
|
|
316
|
+
reason: z.ZodString;
|
|
317
|
+
}, z.core.$strip>]>>;
|
|
172
318
|
resolution: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>>;
|
|
173
319
|
}>;
|
|
174
320
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-input.d.ts","sourceRoot":"","sources":["../../src/hono/connection-input.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection-input.d.ts","sourceRoot":"","sources":["../../src/hono/connection-input.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,0BAA0B,sCAAsC,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,YAC/B,YAAY,EACZ,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,cAAc,EACd,WAAW,EACX,WAAW,EACX,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AgB,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYxC"}
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
* Console, Tag Manager), where they also pick which accounts it may read, or a
|
|
7
7
|
* tool (HubSpot, Google Drive, GoHighLevel, Pipedrive, Calendly, SavvyCal),
|
|
8
8
|
* where connecting is the whole answer — without the user leaving the chat.
|
|
9
|
+
* It also adds tools: a remote MCP server the user described (`{ server }`,
|
|
10
|
+
* filled in from their instructions) or, when the vendor has none, a managed
|
|
11
|
+
* app from the catalog (`{ app }`). Those load into the running query once the
|
|
12
|
+
* card resolves (`BridgeJobExecutor.reloadMcpServers`), so the agent can call
|
|
13
|
+
* them in the same turn.
|
|
9
14
|
*
|
|
10
15
|
* Nothing confidential passes through the model: the bridge parks the turn in
|
|
11
16
|
* `canUseTool`, the dashboard runs the OAuth popup and writes the selection onto
|
|
@@ -18,6 +23,7 @@
|
|
|
18
23
|
*/
|
|
19
24
|
import { tool } from "@anthropic-ai/claude-agent-sdk";
|
|
20
25
|
import { z } from "zod";
|
|
26
|
+
import { answeredInTheCard } from "./blocking-card.js";
|
|
21
27
|
import { toToolInputArray } from "./tool-input.js";
|
|
22
28
|
export const CONNECTION_INPUT_TOOL_NAME = "mcp__baker_ui__request_connection";
|
|
23
29
|
/**
|
|
@@ -46,8 +52,23 @@ export const CONNECTION_PLATFORMS = [
|
|
|
46
52
|
"pipedrive",
|
|
47
53
|
"calendly",
|
|
48
54
|
"savvycal",
|
|
55
|
+
"chatgpt-ads",
|
|
49
56
|
];
|
|
50
|
-
|
|
57
|
+
/**
|
|
58
|
+
* The platforms whose connection carries a choice of accounts, properties,
|
|
59
|
+
* sites or containers — `hasResourceSelection` in the dashboard. Only these
|
|
60
|
+
* have a picker for `pick` to open.
|
|
61
|
+
*/
|
|
62
|
+
const PICKABLE_PLATFORMS = new Set([
|
|
63
|
+
"google-ads",
|
|
64
|
+
"linkedin",
|
|
65
|
+
"meta",
|
|
66
|
+
"google-analytics",
|
|
67
|
+
"google-search-console",
|
|
68
|
+
"google-tag-manager",
|
|
69
|
+
"x-ads",
|
|
70
|
+
]);
|
|
71
|
+
const platformRequestShape = z.object({
|
|
51
72
|
platform: z.enum(CONNECTION_PLATFORMS).describe("Which platform the user needs to connect"),
|
|
52
73
|
reason: z
|
|
53
74
|
.string()
|
|
@@ -56,13 +77,55 @@ const connectionRequestShape = z.object({
|
|
|
56
77
|
.literal("media-folder")
|
|
57
78
|
.optional()
|
|
58
79
|
.describe("Google Drive only: the user picks a folder whose images and videos Baker imports into the libraries (a media source). Set it whenever the user wants a Drive folder's photos or videos in Baker."),
|
|
80
|
+
pick: z
|
|
81
|
+
.boolean()
|
|
82
|
+
.optional()
|
|
83
|
+
.describe("Ad and data platforms only: open the account picker straight away. Set it when the platform is already connected but the account, property, site or container you need is not selected — `--available` on the platform's accounts command shows which are."),
|
|
84
|
+
});
|
|
85
|
+
/** Who reaches a connected app or server — mirrors the custom-MCP scope model. */
|
|
86
|
+
const REACH = ["user", "user_org", "company", "org"];
|
|
87
|
+
const serverShape = z.object({
|
|
88
|
+
name: z
|
|
89
|
+
.string()
|
|
90
|
+
.min(1)
|
|
91
|
+
.describe("Short lowercase slug for the server, e.g. `acme` — its tools become mcp__<name>__*"),
|
|
92
|
+
url: z.string().min(1).describe("The FULL https endpoint, usually ending in /mcp — never just the domain"),
|
|
93
|
+
auth: z
|
|
94
|
+
.enum(["none", "key", "sign-in"])
|
|
95
|
+
.optional()
|
|
96
|
+
.describe("How it signs in, from the vendor's instructions: `none` (public), `key` (a required API key sent in a header — the user types it into the card, never into the chat; a key the docs call optional is `none`), `sign-in` (the server runs its own sign-in popup). Omit when unsure: the card tries a sign-in and falls back to nothing."),
|
|
97
|
+
keyHeader: z
|
|
98
|
+
.string()
|
|
99
|
+
.min(1)
|
|
100
|
+
.optional()
|
|
101
|
+
.describe("`key` only: the header the key goes in, e.g. `Authorization` or `X-API-Key`"),
|
|
102
|
+
scope: z
|
|
103
|
+
.enum(REACH)
|
|
104
|
+
.optional()
|
|
105
|
+
.describe("Who reaches it: `company` (everyone in this company — the default), `user` (only the person asking, here), `user_org` (only them, in every company of the organization), `org` (everyone in every company — admins only). The user can change it in the card."),
|
|
106
|
+
});
|
|
107
|
+
const appRequestShape = z.object({
|
|
108
|
+
app: z
|
|
109
|
+
.string()
|
|
110
|
+
.min(1)
|
|
111
|
+
.describe("A managed app's slug from `baker mcp catalog --search <name>` — the fallback when the vendor has no MCP server"),
|
|
112
|
+
reason: z
|
|
113
|
+
.string()
|
|
114
|
+
.describe("One short sentence, in the user's terms, saying what you'll be able to do once it's connected"),
|
|
59
115
|
});
|
|
116
|
+
const serverRequestShape = z.object({
|
|
117
|
+
server: serverShape,
|
|
118
|
+
reason: z
|
|
119
|
+
.string()
|
|
120
|
+
.describe("One short sentence, in the user's terms, saying what you'll be able to do once it's connected"),
|
|
121
|
+
});
|
|
122
|
+
const connectionRequestShape = z.union([platformRequestShape, appRequestShape, serverRequestShape]);
|
|
60
123
|
export const connectionInputToolShape = {
|
|
61
124
|
connections: z
|
|
62
125
|
.array(connectionRequestShape)
|
|
63
126
|
.min(1)
|
|
64
127
|
.max(5)
|
|
65
|
-
.describe("Platforms to ask for; each becomes a tab the user resolves in one form"),
|
|
128
|
+
.describe("Platforms, apps and servers to ask for; each becomes a tab the user resolves in one form"),
|
|
66
129
|
resolution: z
|
|
67
130
|
.object({})
|
|
68
131
|
.catchall(z.unknown())
|
|
@@ -70,7 +133,7 @@ export const connectionInputToolShape = {
|
|
|
70
133
|
.describe("Internal — injected by the bridge after the user resolves the form. Never set this yourself."),
|
|
71
134
|
};
|
|
72
135
|
// --- Redacted resolution echoed back to the model ---
|
|
73
|
-
export const connectionInputResultSchema = z.
|
|
136
|
+
export const connectionInputResultSchema = z.union([
|
|
74
137
|
z.object({
|
|
75
138
|
status: z.literal("connected"),
|
|
76
139
|
platform: z.enum(CONNECTION_PLATFORMS),
|
|
@@ -88,18 +151,89 @@ export const connectionInputResultSchema = z.discriminatedUnion("status", [
|
|
|
88
151
|
platform: z.enum(CONNECTION_PLATFORMS),
|
|
89
152
|
reason: z.string().optional(),
|
|
90
153
|
}),
|
|
154
|
+
z.object({
|
|
155
|
+
status: z.literal("connected"),
|
|
156
|
+
app: z.string(),
|
|
157
|
+
scope: z.enum(REACH),
|
|
158
|
+
accountLabel: z.string().optional(),
|
|
159
|
+
readOnly: z.boolean().optional(),
|
|
160
|
+
}),
|
|
161
|
+
z.object({ status: z.literal("declined"), app: z.string(), reason: z.string().optional() }),
|
|
162
|
+
z.object({
|
|
163
|
+
status: z.literal("connected"),
|
|
164
|
+
server: z.string(),
|
|
165
|
+
scope: z.enum(REACH),
|
|
166
|
+
/** What a person has to fix before its tools answer — the address, the sign-in or the key. */
|
|
167
|
+
problem: z.string().optional(),
|
|
168
|
+
}),
|
|
169
|
+
z.object({ status: z.literal("declined"), server: z.string(), reason: z.string().optional() }),
|
|
91
170
|
]);
|
|
92
171
|
export const connectionInputResolutionSchema = z.object({ results: z.array(connectionInputResultSchema) });
|
|
172
|
+
/**
|
|
173
|
+
* Whether the user connected something that brings MCP tools — an app or a
|
|
174
|
+
* server. Only then is the turn's server set reloaded: a platform is read with
|
|
175
|
+
* `baker` commands and adds no tool, and reloading for nothing would rewrite
|
|
176
|
+
* the tool list, and the prompt cache with it.
|
|
177
|
+
*/
|
|
178
|
+
export function toolsConnected(resolution) {
|
|
179
|
+
return resolution.results.some((result) => result.status === "connected" && ("app" in result || "server" in result));
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* What the user connected that the reloaded server set does not carry, by the
|
|
183
|
+
* name the agent knows it by. An app arrives inside its scope's managed server
|
|
184
|
+
* (`composio_<scope>`), which is absent when the company has managed apps
|
|
185
|
+
* switched off or the session for them could not be made.
|
|
186
|
+
*/
|
|
187
|
+
export function connectedButNotLoaded(resolution, loaded) {
|
|
188
|
+
return resolution.results.flatMap((result) => {
|
|
189
|
+
if (result.status !== "connected")
|
|
190
|
+
return [];
|
|
191
|
+
if ("app" in result)
|
|
192
|
+
return loaded.includes(`composio_${result.scope}`) ? [] : [result.app];
|
|
193
|
+
if ("server" in result)
|
|
194
|
+
return loaded.includes(result.server) ? [] : [result.server];
|
|
195
|
+
return [];
|
|
196
|
+
});
|
|
197
|
+
}
|
|
93
198
|
/** Parse-at-boundary for the resolution posted to `POST /connection-input-decision`. */
|
|
94
199
|
export function parseConnectionInputResolution(value) {
|
|
95
200
|
const parsed = connectionInputResolutionSchema.safeParse(value);
|
|
96
201
|
return parsed.success ? parsed.data : null;
|
|
97
202
|
}
|
|
203
|
+
/** The tab's identity, for collapsing the same ask made twice. */
|
|
204
|
+
function requestKey(request) {
|
|
205
|
+
if ("app" in request)
|
|
206
|
+
return `app:${request.app}`;
|
|
207
|
+
if ("server" in request)
|
|
208
|
+
return `server:${request.server.name}`;
|
|
209
|
+
return `platform:${request.platform}`;
|
|
210
|
+
}
|
|
211
|
+
/** Drop what a request's own kind does not use, so the card never asks for it. */
|
|
212
|
+
function trimRequest(request) {
|
|
213
|
+
if ("server" in request) {
|
|
214
|
+
const { keyHeader, ...server } = request.server;
|
|
215
|
+
// A key header only means something on a server that signs in with a key.
|
|
216
|
+
const keepHeader = keyHeader && (server.auth === undefined || server.auth === "key");
|
|
217
|
+
return { ...request, server: keepHeader ? { ...server, keyHeader } : server };
|
|
218
|
+
}
|
|
219
|
+
if ("app" in request)
|
|
220
|
+
return request;
|
|
221
|
+
// Choosing a folder is a Google Drive thing, and picking accounts belongs to
|
|
222
|
+
// a platform that has accounts to pick; anywhere else either would ask the
|
|
223
|
+
// dashboard for a picker that does not exist.
|
|
224
|
+
const { choose, pick, ...platform } = request;
|
|
225
|
+
return {
|
|
226
|
+
...platform,
|
|
227
|
+
...(choose && platform.platform === "google-drive" ? { choose } : {}),
|
|
228
|
+
...(pick && PICKABLE_PLATFORMS.has(platform.platform) ? { pick } : {}),
|
|
229
|
+
};
|
|
230
|
+
}
|
|
98
231
|
/**
|
|
99
232
|
* `canUseTool` sees the RAW model input — MCP validation hasn't run yet — so the
|
|
100
233
|
* requests are normalized here before anything downstream trusts them. Unknown
|
|
101
234
|
* platforms (TikTok Ads, a hallucinated id) are dropped rather than shown as a
|
|
102
|
-
* dead tab.
|
|
235
|
+
* dead tab. The dashboard applies the same rules (`connectionRequestsFromToolInput`)
|
|
236
|
+
* because it resolves tabs by index into this list.
|
|
103
237
|
*/
|
|
104
238
|
export function normalizeConnectionInputToolInput(input) {
|
|
105
239
|
if (typeof input !== "object" || input === null) {
|
|
@@ -110,28 +244,34 @@ export function normalizeConnectionInputToolInput(input) {
|
|
|
110
244
|
const requests = [];
|
|
111
245
|
for (const entry of raw) {
|
|
112
246
|
const parsed = connectionRequestShape.safeParse(entry);
|
|
113
|
-
if (!parsed.success
|
|
247
|
+
if (!parsed.success) {
|
|
114
248
|
continue;
|
|
115
249
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
250
|
+
const key = requestKey(parsed.data);
|
|
251
|
+
if (seen.has(key)) {
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
seen.add(key);
|
|
255
|
+
requests.push(trimRequest(parsed.data));
|
|
121
256
|
}
|
|
122
257
|
return requests;
|
|
123
258
|
}
|
|
124
259
|
const CONNECTION_INPUT_TOOL_DESCRIPTION = [
|
|
125
|
-
"Ask the user to connect — or reconnect —
|
|
126
|
-
"
|
|
260
|
+
"Ask the user to connect — or reconnect — something inside the chat. BLOCKS until they resolve it in the dashboard. Three kinds of entry, mixed freely in one call:",
|
|
261
|
+
"(1) `{ platform }` — one of Baker's connections: an ad or data platform (Google Ads, LinkedIn Ads, Meta Ads, X Ads, Google Analytics 4, Google Search Console, Google Tag Manager), where they also pick which accounts Baker may read; ChatGPT Ads (`chatgpt-ads`), where they paste its API key into the card; or a tool (HubSpot, Google Drive, GoHighLevel, Pipedrive, Calendly, SavvyCal). ALWAYS first for these: Baker's own connection wins even when the vendor publishes an MCP server or the user names one — never ask for one of them as (2) or (3).",
|
|
262
|
+
"(2) `{ server: { name, url, auth, keyHeader, scope } }` — a remote MCP server. Use it whenever the user gives you an MCP server's address or setup instructions, or asks for any tool that is not connected: always try the vendor's real server FIRST. No address given? Find it yourself before asking the user anything — WebSearch '<vendor> MCP server', WebFetch the vendor's own docs, and take the official remote https endpoint and how it signs in from there. Official = on the vendor's own domain or in the vendor's own docs; never a server someone else hosts (a GitHub project, a directory listing) unless the user named it — with no official one, use (3). Fill in everything you know from their instructions — the card opens with it filled in and the user only confirms, types a key if there is one, or signs in. Never ask for a key in the chat.",
|
|
263
|
+
"(3) `{ app }` — the FALLBACK when the vendor has no MCP server: a managed app from `baker mcp catalog --search <name>`, which the user signs in to from the card.",
|
|
264
|
+
"Use it the moment a command tells you a platform isn't connected, OR that it is connected but does not allow what you asked (a `request_connection` fix, `HUBSPOT_RECONNECT_REQUIRED`, a read-only connection) — the card shows Reconnect when the connection exists. Never tell the user to go to Settings or the Integrations page instead. Each entry becomes a tab, so ask for everything the task needs in ONE call.",
|
|
127
265
|
"`reason` is shown to the user: say what connecting unlocks in their terms ('so I can see which campaigns are actually converting', 'so I can count a contact becoming a customer'), never in technical terms.",
|
|
266
|
+
"Platform connected but the account, property, site or container you need is not selected (`--available` on its accounts command shows `selected: false`)? Ask for that platform with `pick: true`: the card opens its picker straight away and the user ticks it — never tell them to go and pick it elsewhere.",
|
|
128
267
|
'When the user wants a Google Drive folder\'s photos or videos in Baker, ask for `google-drive` with `choose: "media-folder"`: the card lets them pick the folder, Baker imports it as a media source (weekly by default), and the result carries its `mediaSourceKey` for `baker media-sources`. The import runs in the background — tell the user the library is filling, never that it is ready. A Drive folder is never added by link.',
|
|
129
|
-
"A
|
|
268
|
+
"A connected app or server's tools load straight after the card resolves, in this same turn, when the result says `toolsReady: true` — call them right away (a server's tools are mcp__<name>__*, an app's ride mcp__composio_*). A server result with `problem` will not answer until a person fixes what it names; relay it plainly. `toolsReady: false` means they arrive with the user's next message — unless the app or server is named in `failedToLoad`: it did not load, so say plainly it isn't working yet and never promise it for later.",
|
|
269
|
+
"A declined tab is not an error — carry on with what you can do without it and say what stays unavailable. A declined key server: the key goes into the card, never the chat — offer to open the card again. A connected result may list `cannotRead`: things the connection still does not allow — do not promise those. Results name only the account and what was selected; no credentials ever reach you.",
|
|
130
270
|
].join(" ");
|
|
131
271
|
export function createConnectionInputTool() {
|
|
132
|
-
return tool("request_connection", CONNECTION_INPUT_TOOL_DESCRIPTION, connectionInputToolShape, (args) => {
|
|
272
|
+
return answeredInTheCard(tool("request_connection", CONNECTION_INPUT_TOOL_DESCRIPTION, connectionInputToolShape, (args) => {
|
|
133
273
|
const resolution = args.resolution ?? { results: [] };
|
|
134
274
|
return Promise.resolve({ content: [{ type: "text", text: JSON.stringify(resolution) }] });
|
|
135
|
-
});
|
|
275
|
+
}));
|
|
136
276
|
}
|
|
137
277
|
//# sourceMappingURL=connection-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-input.js","sourceRoot":"","sources":["../../src/hono/connection-input.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"connection-input.js","sourceRoot":"","sources":["../../src/hono/connection-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,CAAC,MAAM,0BAA0B,GAAG,mCAAmC,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,YAAY;IACZ,UAAU;IACV,MAAM;IACN,kBAAkB;IAClB,uBAAuB;IACvB,oBAAoB;IACpB,OAAO;I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