@tiny-fish/cli 0.5.1-next.98 → 0.6.1-next.101
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/commands/connect.js +16 -2
- package/package.json +1 -1
package/dist/commands/connect.js
CHANGED
|
@@ -23,6 +23,7 @@ export const OPENCLAW_ONBOARDING_PROMPT = "I just installed the TinyFish skill.
|
|
|
23
23
|
"I want to complete and wait before using TinyFish Agent. Never skip ahead or choose for me.";
|
|
24
24
|
const CLAUDE_CODE = {
|
|
25
25
|
command: "claude",
|
|
26
|
+
connectClient: "claude-code",
|
|
26
27
|
displayName: "Claude Code",
|
|
27
28
|
supportCheck: {
|
|
28
29
|
args: ["mcp", "--help"],
|
|
@@ -42,6 +43,7 @@ const CLAUDE_CODE = {
|
|
|
42
43
|
};
|
|
43
44
|
const CODEX = {
|
|
44
45
|
command: "codex",
|
|
46
|
+
connectClient: "codex",
|
|
45
47
|
displayName: "Codex",
|
|
46
48
|
supportCheck: {
|
|
47
49
|
args: ["mcp", "add", "--help"],
|
|
@@ -49,7 +51,15 @@ const CODEX = {
|
|
|
49
51
|
unavailableMessage: CODEX_OAUTH_RESOURCE_UNAVAILABLE_MESSAGE,
|
|
50
52
|
},
|
|
51
53
|
removals: [{ args: ["mcp", "remove", "tinyfish"], label: "TinyFish registration from Codex" }],
|
|
52
|
-
addArgs: (mcpUrl) => [
|
|
54
|
+
addArgs: (mcpUrl, oauthResource) => [
|
|
55
|
+
"mcp",
|
|
56
|
+
"add",
|
|
57
|
+
"tinyfish",
|
|
58
|
+
"--url",
|
|
59
|
+
mcpUrl,
|
|
60
|
+
"--oauth-resource",
|
|
61
|
+
oauthResource,
|
|
62
|
+
],
|
|
53
63
|
};
|
|
54
64
|
function launchHermesWalkthrough() {
|
|
55
65
|
const seedResult = spawn.sync("hermes", ["chat", "-Q", "-q", DEFAULT_ONBOARDING_PROMPT], {
|
|
@@ -77,6 +87,7 @@ function launchHermesWalkthrough() {
|
|
|
77
87
|
}
|
|
78
88
|
const HERMES = {
|
|
79
89
|
command: "hermes",
|
|
90
|
+
connectClient: "hermes",
|
|
80
91
|
displayName: "Hermes",
|
|
81
92
|
supportCheck: {
|
|
82
93
|
args: ["mcp", "add", "--help"],
|
|
@@ -139,8 +150,11 @@ function connectNativeMcpClient(client, options) {
|
|
|
139
150
|
requireCommandSupport(client);
|
|
140
151
|
for (const removal of client.removals)
|
|
141
152
|
removeExistingRegistration(client, removal);
|
|
153
|
+
const mcpUrl = new URL(options.mcpUrl);
|
|
154
|
+
mcpUrl.searchParams.set("source", "tinyfish_cli");
|
|
155
|
+
mcpUrl.searchParams.set("client", client.connectClient);
|
|
142
156
|
errLine(`Adding TinyFish to ${client.displayName}...`);
|
|
143
|
-
const addResult = spawn.sync(client.command, client.addArgs(options.mcpUrl), {
|
|
157
|
+
const addResult = spawn.sync(client.command, client.addArgs(mcpUrl.toString(), options.mcpUrl), {
|
|
144
158
|
stdio: "inherit",
|
|
145
159
|
});
|
|
146
160
|
if (addResult.error || addResult.status !== 0) {
|