flyspace-cli 0.1.64 → 0.1.66
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/{chunk-FNKFJQB7.js → chunk-DVHYIWIW.js} +244 -14
- package/dist/{chunk-O7OYNQND.js → chunk-KPZOOR73.js} +14 -8
- package/dist/{chunk-WFUR2BYO.js → chunk-ODQS4YBM.js} +29 -1
- package/dist/cli.js +494 -234
- package/dist/index.js +2 -2
- package/dist/{threads-VOXFIRD6.js → threads-62Y2BIFT.js} +22 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { createRequire as __flyspaceCreateRequire } from 'node:module';
|
|
|
3
3
|
const require = __flyspaceCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
startServer
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-DVHYIWIW.js";
|
|
7
|
+
import "./chunk-KPZOOR73.js";
|
|
8
8
|
export {
|
|
9
9
|
startServer
|
|
10
10
|
};
|
|
@@ -10,18 +10,20 @@ import {
|
|
|
10
10
|
listAutoUpdateSharesAction,
|
|
11
11
|
listChannelsAction,
|
|
12
12
|
moveThreadAction,
|
|
13
|
+
openDocAction,
|
|
13
14
|
postReplyAction,
|
|
14
15
|
readThreadAction,
|
|
15
16
|
requestPermissionAction,
|
|
16
17
|
searchThreadsAction,
|
|
18
|
+
setUiZoomAction,
|
|
17
19
|
shareDoc,
|
|
18
20
|
shareDocAction
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ODQS4YBM.js";
|
|
20
22
|
import {
|
|
21
23
|
SessionStore,
|
|
22
24
|
paths,
|
|
23
25
|
uploadLocalImages
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KPZOOR73.js";
|
|
25
27
|
|
|
26
28
|
// src/mcp/servers/threads.ts
|
|
27
29
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
@@ -89,7 +91,9 @@ function requester() {
|
|
|
89
91
|
const env = process.env;
|
|
90
92
|
return {
|
|
91
93
|
...env["FLYSPACE_THREADS_WORKSPACE"] ? { workspace: env["FLYSPACE_THREADS_WORKSPACE"] } : {},
|
|
92
|
-
...env["FLYSPACE_REQUESTER_HANDLE"] ? { handle: env["FLYSPACE_REQUESTER_HANDLE"] } : {}
|
|
94
|
+
...env["FLYSPACE_REQUESTER_HANDLE"] ? { handle: env["FLYSPACE_REQUESTER_HANDLE"] } : {},
|
|
95
|
+
...env["FLYSPACE_THREAD_ID"] ? { threadId: env["FLYSPACE_THREAD_ID"] } : {},
|
|
96
|
+
...env["FLYSPACE_CHANNEL_ID"] ? { channelId: env["FLYSPACE_CHANNEL_ID"] } : {}
|
|
93
97
|
};
|
|
94
98
|
}
|
|
95
99
|
async function readThread(ref) {
|
|
@@ -198,6 +202,21 @@ async function callTool(name, args, permission) {
|
|
|
198
202
|
if (!channelId || !path) throw new Error("channel_id and path are required");
|
|
199
203
|
return shareDoc(channelId, path, str(args["slug"])?.trim() || void 0);
|
|
200
204
|
}
|
|
205
|
+
case openDocAction.name: {
|
|
206
|
+
const line = typeof args["line"] === "number" ? args["line"] : void 0;
|
|
207
|
+
const path = str(args["path"])?.trim() ?? "";
|
|
208
|
+
await callAction(
|
|
209
|
+
openDocAction,
|
|
210
|
+
{ channel_id: str(args["channel_id"])?.trim() ?? "", path, ...line ? { line } : {} },
|
|
211
|
+
requester()
|
|
212
|
+
);
|
|
213
|
+
return `Opened ${path} in the requester's Docs pane.`;
|
|
214
|
+
}
|
|
215
|
+
case setUiZoomAction.name: {
|
|
216
|
+
const percent = Number(args["percent"]);
|
|
217
|
+
await callAction(setUiZoomAction, { percent }, requester());
|
|
218
|
+
return `Set the requester's UI zoom to ${percent}%.`;
|
|
219
|
+
}
|
|
201
220
|
case requestPermissionAction.name: {
|
|
202
221
|
if (!permission) break;
|
|
203
222
|
const input = args["input"] && typeof args["input"] === "object" ? args["input"] : {};
|