flyspace-cli 0.1.1 → 0.1.4

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/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  startServer
4
- } from "./chunk-6D2PIFEA.js";
5
- import "./chunk-QZIN7MWV.js";
4
+ } from "./chunk-BZYTXXF7.js";
5
+ import "./chunk-ZBMYF5LX.js";
6
6
  export {
7
7
  startServer
8
8
  };
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  listChannels,
4
4
  moveThread
5
- } from "./chunk-X7SJ653V.js";
5
+ } from "./chunk-6PJ73XYW.js";
6
6
  import {
7
7
  getSupabaseClient,
8
8
  postToDashboardChannel
9
- } from "./chunk-QZIN7MWV.js";
9
+ } from "./chunk-ZBMYF5LX.js";
10
10
 
11
11
  // src/mcp/servers/threads.ts
12
12
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -82,14 +82,20 @@ function formatThread(thread, replies) {
82
82
  }
83
83
  async function readThread(threadId) {
84
84
  const supabase = getSupabaseClient();
85
- const { data: thread, error } = await supabase.from("threads").select("title, author, body, created_at").eq("id", threadId).maybeSingle();
85
+ const { data: thread, error } = await supabase.from("threads").select("title, auto_title, author, created_at").eq("id", threadId).maybeSingle();
86
86
  if (error) throw new Error(`read failed: ${error.message}`);
87
87
  if (!thread) return `No thread with id ${threadId}.`;
88
- const { data: replies, error: repliesError } = await supabase.from("thread_replies").select("author, body, created_at").eq("thread_id", threadId).order("created_at", { ascending: true }).limit(MAX_REPLIES);
88
+ const { data: replies, error: repliesError } = await supabase.from("thread_replies").select("author, body, created_at").eq("thread_id", threadId).is("archived_at", null).order("created_at", { ascending: true }).limit(MAX_REPLIES);
89
89
  if (repliesError) throw new Error(`read failed: ${repliesError.message}`);
90
+ const [opening, ...rest] = replies ?? [];
90
91
  return formatThread(
91
- thread,
92
- replies ?? []
92
+ {
93
+ title: thread.title ?? thread.auto_title,
94
+ author: thread.author,
95
+ body: opening?.body ?? null,
96
+ created_at: thread.created_at
97
+ },
98
+ rest
93
99
  );
94
100
  }
95
101
  var TOOLS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flyspace-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.4",
4
4
  "description": "AI-native headless community OS",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "private": false,
@@ -17,7 +17,7 @@
17
17
  "slack-app-manifest.yml"
18
18
  ],
19
19
  "scripts": {
20
- "dev": "tsx watch --clear-screen=false src/cli.ts dashboard --mode all --port 4848 --no-open",
20
+ "dev": "mkdir -p .logs && tsx watch --clear-screen=false src/cli.ts dashboard --mode all --port 4848 --no-open 2>&1 | tee -a .logs/dev.log",
21
21
  "dev:slack": "tsx src/cli.ts start",
22
22
  "dev:slack:debug": "DEBUG=true tsx src/cli.ts start",
23
23
  "dev:data": "tsx src/dashboard/data-server.ts",