zubo 0.1.11 → 0.1.12
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/package.json
CHANGED
|
@@ -16,9 +16,9 @@ export function registerGoogleOAuthTool(): void {
|
|
|
16
16
|
name: "google_oauth",
|
|
17
17
|
description:
|
|
18
18
|
"Manage the Google OAuth 2.0 connection used by Gmail, Calendar, Sheets, Docs, and Drive. " +
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
19
|
+
"Use action 'start' to begin or re-start the OAuth flow. If credentials are already stored in secrets, " +
|
|
20
|
+
"you can call 'start' with NO parameters — it will automatically use the saved google_client_id and google_client_secret. " +
|
|
21
|
+
"Only ask the user for client_id and client_secret if this tool returns an error saying they are missing. " +
|
|
22
22
|
"Use 'complete' to finish the flow by providing the authorization code the user copied from the browser. " +
|
|
23
23
|
"Use 'status' to check connection state. Use 'disconnect' to remove all stored Google credentials.",
|
|
24
24
|
input_schema: {
|
|
@@ -32,12 +32,12 @@ export function registerGoogleOAuthTool(): void {
|
|
|
32
32
|
client_id: {
|
|
33
33
|
type: "string",
|
|
34
34
|
description:
|
|
35
|
-
"Google OAuth client ID
|
|
35
|
+
"Google OAuth client ID. Optional — if omitted, uses the value already saved in secrets.",
|
|
36
36
|
},
|
|
37
37
|
client_secret: {
|
|
38
38
|
type: "string",
|
|
39
39
|
description:
|
|
40
|
-
"Google OAuth client secret
|
|
40
|
+
"Google OAuth client secret. Optional — if omitted, uses the value already saved in secrets.",
|
|
41
41
|
},
|
|
42
42
|
code: {
|
|
43
43
|
type: "string",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { registerTool } from "../registry";
|
|
2
|
-
import { setSecret, listSecrets, deleteSecret } from "../../secrets/store";
|
|
2
|
+
import { setSecret, getSecret, listSecrets, deleteSecret } from "../../secrets/store";
|
|
3
3
|
|
|
4
4
|
export function registerSecretTools() {
|
|
5
5
|
registerTool({
|
|
@@ -52,6 +52,37 @@ export function registerSecretTools() {
|
|
|
52
52
|
},
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
+
registerTool({
|
|
56
|
+
definition: {
|
|
57
|
+
name: "secret_get",
|
|
58
|
+
description:
|
|
59
|
+
"Retrieve the value of a stored secret. Use this to access API keys, tokens, and credentials needed for tool calls and integrations.",
|
|
60
|
+
input_schema: {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
name: {
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "The name of the secret to retrieve (e.g., 'github_token', 'google_client_id')",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
required: ["name"],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
execute: async (input) => {
|
|
72
|
+
const { name } = input as { name: string };
|
|
73
|
+
if (!name) {
|
|
74
|
+
return JSON.stringify({ error: "Secret name is required." });
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const value = getSecret(name);
|
|
78
|
+
if (value === null) {
|
|
79
|
+
return JSON.stringify({ error: `No secret found with name "${name}".` });
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return JSON.stringify({ name, value });
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
|
|
55
86
|
registerTool({
|
|
56
87
|
definition: {
|
|
57
88
|
name: "secret_list",
|
package/src/tools/permissions.ts
CHANGED
|
@@ -9,8 +9,9 @@ const DEFAULT_PERMISSIONS: Record<string, ToolPermission> = {
|
|
|
9
9
|
reminder_set: "auto",
|
|
10
10
|
diagnose: "auto",
|
|
11
11
|
|
|
12
|
-
// Secrets — set/list are safe, delete requires confirmation
|
|
12
|
+
// Secrets — set/list/get are safe, delete requires confirmation
|
|
13
13
|
secret_set: "auto",
|
|
14
|
+
secret_get: "auto",
|
|
14
15
|
secret_list: "auto",
|
|
15
16
|
secret_delete: "confirm",
|
|
16
17
|
|