@openlap/openlap 1.1.0 → 1.1.1
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/proxy.js +50 -2
- package/package.json +1 -1
package/dist/proxy.js
CHANGED
|
@@ -117,10 +117,58 @@ export async function startProxy() {
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
}, getAuthToken);
|
|
120
|
-
// Forward tool listing from remote
|
|
120
|
+
// Forward tool listing from remote + inject proxy-side channel tools
|
|
121
121
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
122
122
|
const result = await remote.listTools();
|
|
123
|
-
|
|
123
|
+
// v2: proxy-side channel tools (not registered on server)
|
|
124
|
+
const proxyTools = [
|
|
125
|
+
{
|
|
126
|
+
name: "join_channel",
|
|
127
|
+
description: "Join a channel. Registers presence, opens SSE subscription, returns who's here and recent posts. You'll receive live updates from this channel. Use leave_channel to unsubscribe.",
|
|
128
|
+
inputSchema: {
|
|
129
|
+
type: "object",
|
|
130
|
+
properties: {
|
|
131
|
+
channel: { type: "string", description: "Channel name (e.g. \"openlap-v2\")" },
|
|
132
|
+
name: { type: "string", description: "Display name (defaults to GitHub login). Use for role names like \"worker\" or \"adversary\"." },
|
|
133
|
+
},
|
|
134
|
+
required: ["channel"],
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "leave_channel",
|
|
139
|
+
description: "Leave a channel. Removes presence and stops SSE subscription. Other members see you leave.",
|
|
140
|
+
inputSchema: {
|
|
141
|
+
type: "object",
|
|
142
|
+
properties: {
|
|
143
|
+
channel: { type: "string", description: "Channel name" },
|
|
144
|
+
},
|
|
145
|
+
required: ["channel"],
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: "mute_channel",
|
|
150
|
+
description: "Mute a channel. Still present (heartbeat continues) but notifications stop. Other members still see you as present. Use focus_channel to unmute.",
|
|
151
|
+
inputSchema: {
|
|
152
|
+
type: "object",
|
|
153
|
+
properties: {
|
|
154
|
+
channel: { type: "string", description: "Channel name" },
|
|
155
|
+
},
|
|
156
|
+
required: ["channel"],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "focus_channel",
|
|
161
|
+
description: "Focus on a channel. Unmutes it and pins it to briefings. Only one channel can be focused at a time.",
|
|
162
|
+
inputSchema: {
|
|
163
|
+
type: "object",
|
|
164
|
+
properties: {
|
|
165
|
+
channel: { type: "string", description: "Channel name" },
|
|
166
|
+
},
|
|
167
|
+
required: ["channel"],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
];
|
|
171
|
+
return { tools: [...result.tools, ...proxyTools] };
|
|
124
172
|
});
|
|
125
173
|
// Forward tool calls with local enhancements
|
|
126
174
|
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|