flyspace-cli 0.1.63 → 0.1.65
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-SBNBTJKW.js → chunk-5ISKGSFF.js} +491 -76
- package/dist/{chunk-PLLJ7M62.js → chunk-GQ2QZ5WF.js} +40 -1
- package/dist/{chunk-UZMHXV4D.js → chunk-O7OYNQND.js} +46 -15
- package/dist/cli.js +187 -277
- package/dist/index.js +2 -2
- package/dist/{threads-BFRTS4EB.js → threads-AR6D7V3Y.js} +24 -4
- 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-5ISKGSFF.js";
|
|
7
|
+
import "./chunk-O7OYNQND.js";
|
|
8
8
|
export {
|
|
9
9
|
startServer
|
|
10
10
|
};
|
|
@@ -7,20 +7,23 @@ import {
|
|
|
7
7
|
callAction,
|
|
8
8
|
checkPermissionAction,
|
|
9
9
|
createThreadAction,
|
|
10
|
+
listAutoUpdateSharesAction,
|
|
10
11
|
listChannelsAction,
|
|
11
12
|
moveThreadAction,
|
|
13
|
+
openDocAction,
|
|
12
14
|
postReplyAction,
|
|
13
15
|
readThreadAction,
|
|
14
16
|
requestPermissionAction,
|
|
15
17
|
searchThreadsAction,
|
|
18
|
+
setUiZoomAction,
|
|
16
19
|
shareDoc,
|
|
17
20
|
shareDocAction
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GQ2QZ5WF.js";
|
|
19
22
|
import {
|
|
20
23
|
SessionStore,
|
|
21
24
|
paths,
|
|
22
25
|
uploadLocalImages
|
|
23
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-O7OYNQND.js";
|
|
24
27
|
|
|
25
28
|
// src/mcp/servers/threads.ts
|
|
26
29
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
@@ -88,7 +91,9 @@ function requester() {
|
|
|
88
91
|
const env = process.env;
|
|
89
92
|
return {
|
|
90
93
|
...env["FLYSPACE_THREADS_WORKSPACE"] ? { workspace: env["FLYSPACE_THREADS_WORKSPACE"] } : {},
|
|
91
|
-
...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"] } : {}
|
|
92
97
|
};
|
|
93
98
|
}
|
|
94
99
|
async function readThread(ref) {
|
|
@@ -100,7 +105,7 @@ async function readThread(ref) {
|
|
|
100
105
|
${formatThread({ ...thread, body: opening?.body ?? null }, rest)}`;
|
|
101
106
|
}
|
|
102
107
|
var TOOLS = ACTIONS.filter(
|
|
103
|
-
(a) => a !== checkPermissionAction && a !== requestPermissionAction
|
|
108
|
+
(a) => a !== checkPermissionAction && a !== requestPermissionAction && a !== listAutoUpdateSharesAction
|
|
104
109
|
).map(toTool);
|
|
105
110
|
var PERMISSION_TOOL = toTool(requestPermissionAction);
|
|
106
111
|
function toTool(action) {
|
|
@@ -197,6 +202,21 @@ async function callTool(name, args, permission) {
|
|
|
197
202
|
if (!channelId || !path) throw new Error("channel_id and path are required");
|
|
198
203
|
return shareDoc(channelId, path, str(args["slug"])?.trim() || void 0);
|
|
199
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
|
+
}
|
|
200
220
|
case requestPermissionAction.name: {
|
|
201
221
|
if (!permission) break;
|
|
202
222
|
const input = args["input"] && typeof args["input"] === "object" ? args["input"] : {};
|