@pome-sh/cli 0.21.12 → 0.21.14
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/build-info.json +3 -3
- package/dist/{checks-FLXH5OG3.js → checks-6E6OKTHQ.js} +1 -1
- package/dist/chunk-4MQULI7E.js +427 -0
- package/dist/{chunk-563RZ7P3.js → chunk-BTDWCUMP.js} +11 -11
- package/dist/{chunk-EI5ECLLN.js → chunk-DSQNW2ZT.js} +2 -2
- package/dist/{chunk-6BCL7HYR.js → chunk-LKN7DYCG.js} +1 -1
- package/dist/{chunk-75SDBO3W.js → chunk-P6RAEIIU.js} +1 -1
- package/dist/{chunk-OR4X4BIY.js → chunk-TIY2TZAD.js} +1 -1
- package/dist/{runDemo-7ZNVR4GX.js → runDemo-JPIZBQ2W.js} +4 -4
- package/dist/{runTrialGroup-7KEOFQEU.js → runTrialGroup-JHZ4LPKF.js} +3 -3
- package/dist/src/cli/main.js +12 -12
- package/dist/{src-YH33B2LP.js → src-566DJYOC.js} +441 -339
- package/dist/{src-JWB5RQSN.js → src-EAA6L4CV.js} +137 -42
- package/dist/{src-RDRKZ4FM.js → src-GIKWIJM2.js} +802 -281
- package/dist/{src-RUUCDQU4.js → src-MX3THU4R.js} +369 -193
- package/dist/{src-B63VPRRZ.js → src-WS5PCGRC.js} +647 -431
- package/dist/twinHarness-AHRNZB6Y.js +5 -0
- package/dist/{twinStart-Y525LQUR.js → twinStart-4EYV577J.js} +2 -2
- package/package.json +1 -1
- package/dist/twinHarness-4RDIJIM7.js +0 -5
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { SLACK_CHECKS } from './chunk-LH4EGGQW.js';
|
|
2
2
|
import './chunk-NY55QTVQ.js';
|
|
3
|
+
import { declareRouteInputs, booleanInput, integerInput, mountDeclaredRoute, UndeclaredInputError } from './chunk-4MQULI7E.js';
|
|
3
4
|
import { loadMcpToolFixture, defineTwin, queryTokenResolver, formTokenResolver, deriveMcpToolTable, UnknownToolError, openTwinDatabase, createApp } from './chunk-TV5S6WQV.js';
|
|
4
5
|
import './chunk-VBATFCWR.js';
|
|
5
6
|
import './chunk-SG6ZTIMT.js';
|
|
@@ -246,6 +247,9 @@ function slackError(code, status = 400, extra) {
|
|
|
246
247
|
function notFound(code = "not_found") {
|
|
247
248
|
throw new TwinError(code, 404, code);
|
|
248
249
|
}
|
|
250
|
+
function validationFailed(code = "invalid_arguments", extra) {
|
|
251
|
+
throw new TwinError(code, 400, code, extra);
|
|
252
|
+
}
|
|
249
253
|
function isSqliteConstraintError(err) {
|
|
250
254
|
if (!err || typeof err !== "object")
|
|
251
255
|
return false;
|
|
@@ -305,44 +309,6 @@ function coerceFormValues(raw) {
|
|
|
305
309
|
}
|
|
306
310
|
return out;
|
|
307
311
|
}
|
|
308
|
-
function asString(value, fallback = "") {
|
|
309
|
-
if (typeof value === "string")
|
|
310
|
-
return value;
|
|
311
|
-
if (value === void 0 || value === null)
|
|
312
|
-
return fallback;
|
|
313
|
-
return String(value);
|
|
314
|
-
}
|
|
315
|
-
function asOptionalString(value) {
|
|
316
|
-
if (typeof value !== "string")
|
|
317
|
-
return void 0;
|
|
318
|
-
if (value.length === 0)
|
|
319
|
-
return void 0;
|
|
320
|
-
return value;
|
|
321
|
-
}
|
|
322
|
-
function asNumber(value, fallback) {
|
|
323
|
-
if (typeof value === "number" && Number.isFinite(value))
|
|
324
|
-
return value;
|
|
325
|
-
if (typeof value === "string" && value.length > 0) {
|
|
326
|
-
const parsed = Number(value);
|
|
327
|
-
if (Number.isFinite(parsed))
|
|
328
|
-
return parsed;
|
|
329
|
-
}
|
|
330
|
-
return fallback;
|
|
331
|
-
}
|
|
332
|
-
function asBool(value, fallback = false) {
|
|
333
|
-
if (typeof value === "boolean")
|
|
334
|
-
return value;
|
|
335
|
-
if (typeof value === "string") {
|
|
336
|
-
const v = value.toLowerCase().trim();
|
|
337
|
-
if (v === "1" || v === "true" || v === "yes")
|
|
338
|
-
return true;
|
|
339
|
-
if (v === "0" || v === "false" || v === "no")
|
|
340
|
-
return false;
|
|
341
|
-
}
|
|
342
|
-
if (typeof value === "number")
|
|
343
|
-
return value !== 0;
|
|
344
|
-
return fallback;
|
|
345
|
-
}
|
|
346
312
|
function cursorEncode(payload) {
|
|
347
313
|
return Buffer.from(JSON.stringify(payload), "utf8").toString("base64url");
|
|
348
314
|
}
|
|
@@ -2285,191 +2251,401 @@ var SlackDomain = class {
|
|
|
2285
2251
|
return row?.name ?? id;
|
|
2286
2252
|
}
|
|
2287
2253
|
};
|
|
2254
|
+
var AMBIENT_INPUTS = { token: z.string().optional() };
|
|
2255
|
+
function slackRead(path, args) {
|
|
2256
|
+
const shape = { ...AMBIENT_INPUTS, ...args };
|
|
2257
|
+
return {
|
|
2258
|
+
get: declareRouteInputs({ method: "GET", path, query: shape }),
|
|
2259
|
+
post: declareRouteInputs({ method: "POST", path, body: shape, bodyEncoding: "form" })
|
|
2260
|
+
};
|
|
2261
|
+
}
|
|
2262
|
+
function slackWrite(path, args) {
|
|
2263
|
+
const shape = { ...AMBIENT_INPUTS, ...args };
|
|
2264
|
+
return declareRouteInputs({ method: "POST", path, body: shape, bodyEncoding: "form" });
|
|
2265
|
+
}
|
|
2266
|
+
var emptyIfAbsent = () => z.string().default("");
|
|
2267
|
+
var absentIfEmpty = () => z.string().optional().transform((value) => value ? value : void 0);
|
|
2268
|
+
var falseIfAbsent = () => booleanInput.default(false);
|
|
2269
|
+
var optionalInteger = () => integerInput().optional();
|
|
2270
|
+
var zeroIfAbsent = () => integerInput().default(0);
|
|
2271
|
+
var opaque = () => z.unknown().optional();
|
|
2272
|
+
var SLACK_READS = {
|
|
2273
|
+
authTest: slackRead("/auth.test", {}),
|
|
2274
|
+
conversationsList: slackRead("/conversations.list", {
|
|
2275
|
+
types: absentIfEmpty(),
|
|
2276
|
+
exclude_archived: falseIfAbsent(),
|
|
2277
|
+
limit: optionalInteger(),
|
|
2278
|
+
cursor: absentIfEmpty(),
|
|
2279
|
+
team_id: absentIfEmpty()
|
|
2280
|
+
}),
|
|
2281
|
+
// `channel` is read with `asOptionalString` and the handler raises Slack's own
|
|
2282
|
+
// `channel_not_found` when it is absent, so the schema stays optional.
|
|
2283
|
+
conversationsInfo: slackRead("/conversations.info", {
|
|
2284
|
+
channel: absentIfEmpty(),
|
|
2285
|
+
include_num_members: falseIfAbsent()
|
|
2286
|
+
}),
|
|
2287
|
+
conversationsMembers: slackRead("/conversations.members", {
|
|
2288
|
+
channel: emptyIfAbsent(),
|
|
2289
|
+
limit: optionalInteger(),
|
|
2290
|
+
cursor: absentIfEmpty()
|
|
2291
|
+
}),
|
|
2292
|
+
conversationsHistory: slackRead("/conversations.history", {
|
|
2293
|
+
channel: emptyIfAbsent(),
|
|
2294
|
+
cursor: absentIfEmpty(),
|
|
2295
|
+
inclusive: falseIfAbsent(),
|
|
2296
|
+
latest: absentIfEmpty(),
|
|
2297
|
+
limit: optionalInteger(),
|
|
2298
|
+
oldest: absentIfEmpty()
|
|
2299
|
+
}),
|
|
2300
|
+
conversationsReplies: slackRead("/conversations.replies", {
|
|
2301
|
+
channel: emptyIfAbsent(),
|
|
2302
|
+
ts: emptyIfAbsent(),
|
|
2303
|
+
cursor: absentIfEmpty(),
|
|
2304
|
+
inclusive: falseIfAbsent(),
|
|
2305
|
+
latest: absentIfEmpty(),
|
|
2306
|
+
limit: optionalInteger(),
|
|
2307
|
+
oldest: absentIfEmpty()
|
|
2308
|
+
}),
|
|
2309
|
+
reactionsGet: slackRead("/reactions.get", {
|
|
2310
|
+
channel: emptyIfAbsent(),
|
|
2311
|
+
timestamp: emptyIfAbsent(),
|
|
2312
|
+
full: falseIfAbsent()
|
|
2313
|
+
}),
|
|
2314
|
+
usersList: slackRead("/users.list", {
|
|
2315
|
+
cursor: absentIfEmpty(),
|
|
2316
|
+
limit: optionalInteger(),
|
|
2317
|
+
include_locale: falseIfAbsent(),
|
|
2318
|
+
team_id: absentIfEmpty()
|
|
2319
|
+
}),
|
|
2320
|
+
usersInfo: slackRead("/users.info", {
|
|
2321
|
+
user: emptyIfAbsent(),
|
|
2322
|
+
include_locale: falseIfAbsent()
|
|
2323
|
+
}),
|
|
2324
|
+
usersLookupByEmail: slackRead("/users.lookupByEmail", { email: emptyIfAbsent() }),
|
|
2325
|
+
usersProfileGet: slackRead("/users.profile.get", {
|
|
2326
|
+
user: absentIfEmpty(),
|
|
2327
|
+
include_labels: falseIfAbsent()
|
|
2328
|
+
}),
|
|
2329
|
+
pinsList: slackRead("/pins.list", { channel: emptyIfAbsent() }),
|
|
2330
|
+
searchMessages: slackRead("/search.messages", {
|
|
2331
|
+
query: emptyIfAbsent(),
|
|
2332
|
+
count: optionalInteger(),
|
|
2333
|
+
page: optionalInteger(),
|
|
2334
|
+
sort: absentIfEmpty(),
|
|
2335
|
+
sort_dir: absentIfEmpty(),
|
|
2336
|
+
highlight: falseIfAbsent()
|
|
2337
|
+
}),
|
|
2338
|
+
filesInfo: slackRead("/files.info", { file: emptyIfAbsent() }),
|
|
2339
|
+
filesList: slackRead("/files.list", {
|
|
2340
|
+
channel: absentIfEmpty(),
|
|
2341
|
+
user: absentIfEmpty(),
|
|
2342
|
+
count: optionalInteger(),
|
|
2343
|
+
page: optionalInteger(),
|
|
2344
|
+
types: absentIfEmpty()
|
|
2345
|
+
}),
|
|
2346
|
+
bookmarksList: slackRead("/bookmarks.list", { channel_id: emptyIfAbsent() }),
|
|
2347
|
+
teamInfo: slackRead("/team.info", { team: absentIfEmpty() }),
|
|
2348
|
+
// `domain.emojiList` reads no argument at all, and the pre-F-1179 handler
|
|
2349
|
+
// forwarded the whole merged bag — the silent hole this ticket exists to
|
|
2350
|
+
// close. `include_categories` is what Slack's `emoji.list` declares beyond
|
|
2351
|
+
// `token`, so that is the surface, and an unnamed argument is now refused.
|
|
2352
|
+
emojiList: slackRead("/emoji.list", { include_categories: falseIfAbsent() })
|
|
2353
|
+
};
|
|
2354
|
+
var SLACK_WRITES = {
|
|
2355
|
+
conversationsCreate: slackWrite("/conversations.create", {
|
|
2356
|
+
name: emptyIfAbsent(),
|
|
2357
|
+
is_private: falseIfAbsent(),
|
|
2358
|
+
team_id: absentIfEmpty()
|
|
2359
|
+
}),
|
|
2360
|
+
conversationsArchive: slackWrite("/conversations.archive", { channel: emptyIfAbsent() }),
|
|
2361
|
+
conversationsInvite: slackWrite("/conversations.invite", {
|
|
2362
|
+
channel: emptyIfAbsent(),
|
|
2363
|
+
users: emptyIfAbsent()
|
|
2364
|
+
}),
|
|
2365
|
+
conversationsJoin: slackWrite("/conversations.join", { channel: emptyIfAbsent() }),
|
|
2366
|
+
conversationsLeave: slackWrite("/conversations.leave", { channel: emptyIfAbsent() }),
|
|
2367
|
+
conversationsKick: slackWrite("/conversations.kick", {
|
|
2368
|
+
channel: emptyIfAbsent(),
|
|
2369
|
+
user: emptyIfAbsent()
|
|
2370
|
+
}),
|
|
2371
|
+
conversationsOpen: slackWrite("/conversations.open", {
|
|
2372
|
+
users: absentIfEmpty(),
|
|
2373
|
+
channel: absentIfEmpty(),
|
|
2374
|
+
return_im: falseIfAbsent()
|
|
2375
|
+
}),
|
|
2376
|
+
conversationsSetTopic: slackWrite("/conversations.setTopic", {
|
|
2377
|
+
channel: emptyIfAbsent(),
|
|
2378
|
+
topic: emptyIfAbsent()
|
|
2379
|
+
}),
|
|
2380
|
+
conversationsSetPurpose: slackWrite("/conversations.setPurpose", {
|
|
2381
|
+
channel: emptyIfAbsent(),
|
|
2382
|
+
purpose: emptyIfAbsent()
|
|
2383
|
+
}),
|
|
2384
|
+
chatPostMessage: slackWrite("/chat.postMessage", {
|
|
2385
|
+
channel: emptyIfAbsent(),
|
|
2386
|
+
text: absentIfEmpty(),
|
|
2387
|
+
blocks: absentIfEmpty(),
|
|
2388
|
+
attachments: absentIfEmpty(),
|
|
2389
|
+
thread_ts: absentIfEmpty(),
|
|
2390
|
+
reply_broadcast: falseIfAbsent(),
|
|
2391
|
+
icon_emoji: absentIfEmpty(),
|
|
2392
|
+
icon_url: absentIfEmpty(),
|
|
2393
|
+
username: absentIfEmpty(),
|
|
2394
|
+
as_user: falseIfAbsent()
|
|
2395
|
+
}),
|
|
2396
|
+
chatUpdate: slackWrite("/chat.update", {
|
|
2397
|
+
channel: emptyIfAbsent(),
|
|
2398
|
+
ts: emptyIfAbsent(),
|
|
2399
|
+
text: absentIfEmpty(),
|
|
2400
|
+
blocks: absentIfEmpty(),
|
|
2401
|
+
attachments: absentIfEmpty()
|
|
2402
|
+
}),
|
|
2403
|
+
chatDelete: slackWrite("/chat.delete", {
|
|
2404
|
+
channel: emptyIfAbsent(),
|
|
2405
|
+
ts: emptyIfAbsent()
|
|
2406
|
+
}),
|
|
2407
|
+
chatScheduleMessage: slackWrite("/chat.scheduleMessage", {
|
|
2408
|
+
channel: emptyIfAbsent(),
|
|
2409
|
+
text: emptyIfAbsent(),
|
|
2410
|
+
post_at: zeroIfAbsent(),
|
|
2411
|
+
thread_ts: absentIfEmpty(),
|
|
2412
|
+
blocks: absentIfEmpty()
|
|
2413
|
+
}),
|
|
2414
|
+
chatDeleteScheduledMessage: slackWrite("/chat.deleteScheduledMessage", {
|
|
2415
|
+
channel: emptyIfAbsent(),
|
|
2416
|
+
scheduled_message_id: emptyIfAbsent()
|
|
2417
|
+
}),
|
|
2418
|
+
reactionsAdd: slackWrite("/reactions.add", {
|
|
2419
|
+
channel: emptyIfAbsent(),
|
|
2420
|
+
timestamp: emptyIfAbsent(),
|
|
2421
|
+
name: emptyIfAbsent()
|
|
2422
|
+
}),
|
|
2423
|
+
reactionsRemove: slackWrite("/reactions.remove", {
|
|
2424
|
+
channel: emptyIfAbsent(),
|
|
2425
|
+
timestamp: emptyIfAbsent(),
|
|
2426
|
+
name: emptyIfAbsent()
|
|
2427
|
+
}),
|
|
2428
|
+
usersProfileSet: slackWrite("/users.profile.set", {
|
|
2429
|
+
user: absentIfEmpty(),
|
|
2430
|
+
profile: absentIfEmpty(),
|
|
2431
|
+
name: absentIfEmpty(),
|
|
2432
|
+
value: absentIfEmpty()
|
|
2433
|
+
}),
|
|
2434
|
+
pinsAdd: slackWrite("/pins.add", {
|
|
2435
|
+
channel: emptyIfAbsent(),
|
|
2436
|
+
timestamp: emptyIfAbsent()
|
|
2437
|
+
}),
|
|
2438
|
+
pinsRemove: slackWrite("/pins.remove", {
|
|
2439
|
+
channel: emptyIfAbsent(),
|
|
2440
|
+
timestamp: emptyIfAbsent()
|
|
2441
|
+
}),
|
|
2442
|
+
filesUpload: slackWrite("/files.upload", {
|
|
2443
|
+
channels: absentIfEmpty(),
|
|
2444
|
+
channel: absentIfEmpty(),
|
|
2445
|
+
filename: absentIfEmpty(),
|
|
2446
|
+
title: absentIfEmpty(),
|
|
2447
|
+
filetype: absentIfEmpty(),
|
|
2448
|
+
content: absentIfEmpty(),
|
|
2449
|
+
initial_comment: absentIfEmpty(),
|
|
2450
|
+
thread_ts: absentIfEmpty()
|
|
2451
|
+
}),
|
|
2452
|
+
filesDelete: slackWrite("/files.delete", { file: emptyIfAbsent() }),
|
|
2453
|
+
bookmarksAdd: slackWrite("/bookmarks.add", {
|
|
2454
|
+
channel_id: emptyIfAbsent(),
|
|
2455
|
+
title: emptyIfAbsent(),
|
|
2456
|
+
type: absentIfEmpty(),
|
|
2457
|
+
link: absentIfEmpty(),
|
|
2458
|
+
emoji: absentIfEmpty(),
|
|
2459
|
+
entity_id: absentIfEmpty()
|
|
2460
|
+
}),
|
|
2461
|
+
bookmarksRemove: slackWrite("/bookmarks.remove", {
|
|
2462
|
+
channel_id: emptyIfAbsent(),
|
|
2463
|
+
bookmark_id: emptyIfAbsent()
|
|
2464
|
+
}),
|
|
2465
|
+
canvasesCreate: slackWrite("/canvases.create", {
|
|
2466
|
+
title: absentIfEmpty(),
|
|
2467
|
+
document_content: opaque(),
|
|
2468
|
+
channel_id: absentIfEmpty()
|
|
2469
|
+
}),
|
|
2470
|
+
canvasesEdit: slackWrite("/canvases.edit", {
|
|
2471
|
+
canvas_id: emptyIfAbsent(),
|
|
2472
|
+
changes: opaque()
|
|
2473
|
+
}),
|
|
2474
|
+
canvasesDelete: slackWrite("/canvases.delete", { canvas_id: emptyIfAbsent() })
|
|
2475
|
+
};
|
|
2476
|
+
[
|
|
2477
|
+
...Object.values(SLACK_READS).flatMap((surfaces) => [surfaces.get, surfaces.post]),
|
|
2478
|
+
...Object.values(SLACK_WRITES)
|
|
2479
|
+
];
|
|
2288
2480
|
|
|
2289
2481
|
// ../packages/twin-slack/dist/src/routes.js
|
|
2290
|
-
async function readArgs(c) {
|
|
2291
|
-
const method = c.req.method.toUpperCase();
|
|
2292
|
-
if (method === "GET" || method === "HEAD") {
|
|
2293
|
-
return { ...c.req.query() };
|
|
2294
|
-
}
|
|
2295
|
-
const body = await parseFormOrJson(c);
|
|
2296
|
-
return { ...c.req.query(), ...body };
|
|
2297
|
-
}
|
|
2298
2482
|
function actorFrom(c) {
|
|
2299
2483
|
const session = c.get("session");
|
|
2300
2484
|
return { login: typeof session?.login === "string" ? session.login : void 0 };
|
|
2301
2485
|
}
|
|
2302
|
-
|
|
2486
|
+
async function parseDeclared(declaration, c) {
|
|
2487
|
+
try {
|
|
2488
|
+
return await declaration.parse(c.req);
|
|
2489
|
+
} catch (error) {
|
|
2490
|
+
if (error instanceof UndeclaredInputError) {
|
|
2491
|
+
validationFailed("invalid_arguments", {
|
|
2492
|
+
response_metadata: { messages: [error.message] }
|
|
2493
|
+
});
|
|
2494
|
+
}
|
|
2495
|
+
throw error;
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2303
2498
|
function registerSlackRoutes(app, { domain, recorder }) {
|
|
2304
|
-
const read = (
|
|
2305
|
-
|
|
2499
|
+
const read = (surfaces, call) => {
|
|
2500
|
+
mountDeclaredRoute(app, surfaces.get, recorder.handle({ mutation: false }, async (c) => ({
|
|
2306
2501
|
status: 200,
|
|
2307
|
-
body: slackOk(call(await
|
|
2308
|
-
}));
|
|
2309
|
-
app.
|
|
2310
|
-
|
|
2502
|
+
body: slackOk(call((await parseDeclared(surfaces.get, c)).query, actorFrom(c)))
|
|
2503
|
+
})));
|
|
2504
|
+
mountDeclaredRoute(app, surfaces.post, recorder.handle({ mutation: false }, async (c) => ({
|
|
2505
|
+
status: 200,
|
|
2506
|
+
body: slackOk(call((await parseDeclared(surfaces.post, c)).body, actorFrom(c)))
|
|
2507
|
+
})));
|
|
2311
2508
|
};
|
|
2312
|
-
const write = (
|
|
2313
|
-
app
|
|
2509
|
+
const write = (declaration, call, mutated = () => true) => {
|
|
2510
|
+
mountDeclaredRoute(app, declaration, recorder.handle({ mutation: true }, async (c) => {
|
|
2314
2511
|
let delta = null;
|
|
2315
|
-
const
|
|
2512
|
+
const inputs = await parseDeclared(declaration, c);
|
|
2513
|
+
const result = call(inputs.body, actorFrom(c), (d) => {
|
|
2316
2514
|
delta = d;
|
|
2317
2515
|
});
|
|
2318
2516
|
return { status: 200, body: slackOk(result), delta, mutation: mutated(result) };
|
|
2319
2517
|
}));
|
|
2320
2518
|
};
|
|
2321
|
-
read(
|
|
2322
|
-
read(
|
|
2323
|
-
types:
|
|
2324
|
-
exclude_archived:
|
|
2325
|
-
limit:
|
|
2326
|
-
cursor:
|
|
2327
|
-
team_id:
|
|
2519
|
+
read(SLACK_READS.authTest, (_args, actor) => domain.authTest(actor));
|
|
2520
|
+
read(SLACK_READS.conversationsList, (args) => domain.conversationsList({
|
|
2521
|
+
types: args.types,
|
|
2522
|
+
exclude_archived: args.exclude_archived,
|
|
2523
|
+
limit: args.limit,
|
|
2524
|
+
cursor: args.cursor,
|
|
2525
|
+
team_id: args.team_id
|
|
2328
2526
|
}));
|
|
2329
|
-
read(
|
|
2330
|
-
|
|
2331
|
-
if (!channel)
|
|
2527
|
+
read(SLACK_READS.conversationsInfo, (args, actor) => {
|
|
2528
|
+
if (!args.channel)
|
|
2332
2529
|
throw new TwinError("channel_not_found", 400, "channel_not_found");
|
|
2333
|
-
return domain.conversationsInfo({ channel, include_num_members:
|
|
2530
|
+
return domain.conversationsInfo({ channel: args.channel, include_num_members: args.include_num_members }, actor);
|
|
2334
2531
|
});
|
|
2335
|
-
write(
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
}, actor, delta));
|
|
2340
|
-
write(
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
limit:
|
|
2348
|
-
|
|
2349
|
-
}, actor));
|
|
2350
|
-
read("/conversations.history", (args, actor) => domain.conversationsHistory({
|
|
2351
|
-
channel: asString(args.channel),
|
|
2352
|
-
cursor: asOptionalString(args.cursor),
|
|
2353
|
-
inclusive: asBool(args.inclusive, false),
|
|
2354
|
-
latest: asOptionalString(args.latest),
|
|
2355
|
-
limit: optNum(args.limit, 100),
|
|
2356
|
-
oldest: asOptionalString(args.oldest)
|
|
2532
|
+
write(SLACK_WRITES.conversationsCreate, (args, actor, delta) => domain.conversationsCreate({ name: args.name, is_private: args.is_private, team_id: args.team_id }, actor, delta));
|
|
2533
|
+
write(SLACK_WRITES.conversationsArchive, (args, actor, delta) => domain.conversationsArchive({ channel: args.channel }, actor, delta));
|
|
2534
|
+
write(SLACK_WRITES.conversationsInvite, (args, actor, delta) => domain.conversationsInvite({ channel: args.channel, users: args.users }, actor, delta));
|
|
2535
|
+
write(SLACK_WRITES.conversationsJoin, (args, actor, delta) => domain.conversationsJoin({ channel: args.channel }, actor, delta));
|
|
2536
|
+
write(SLACK_WRITES.conversationsLeave, (args, actor, delta) => domain.conversationsLeave({ channel: args.channel }, actor, delta));
|
|
2537
|
+
write(SLACK_WRITES.conversationsKick, (args, actor, delta) => domain.conversationsKick({ channel: args.channel, user: args.user }, actor, delta));
|
|
2538
|
+
read(SLACK_READS.conversationsMembers, (args, actor) => domain.conversationsMembers({ channel: args.channel, limit: args.limit, cursor: args.cursor }, actor));
|
|
2539
|
+
read(SLACK_READS.conversationsHistory, (args, actor) => domain.conversationsHistory({
|
|
2540
|
+
channel: args.channel,
|
|
2541
|
+
cursor: args.cursor,
|
|
2542
|
+
inclusive: args.inclusive,
|
|
2543
|
+
latest: args.latest,
|
|
2544
|
+
limit: args.limit,
|
|
2545
|
+
oldest: args.oldest
|
|
2357
2546
|
}, actor));
|
|
2358
|
-
read(
|
|
2359
|
-
channel:
|
|
2360
|
-
ts:
|
|
2361
|
-
cursor:
|
|
2362
|
-
inclusive:
|
|
2363
|
-
latest:
|
|
2364
|
-
limit:
|
|
2365
|
-
oldest:
|
|
2547
|
+
read(SLACK_READS.conversationsReplies, (args, actor) => domain.conversationsReplies({
|
|
2548
|
+
channel: args.channel,
|
|
2549
|
+
ts: args.ts,
|
|
2550
|
+
cursor: args.cursor,
|
|
2551
|
+
inclusive: args.inclusive,
|
|
2552
|
+
latest: args.latest,
|
|
2553
|
+
limit: args.limit,
|
|
2554
|
+
oldest: args.oldest
|
|
2366
2555
|
}, actor));
|
|
2367
|
-
write(
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
icon_emoji: asOptionalString(args.icon_emoji),
|
|
2382
|
-
icon_url: asOptionalString(args.icon_url),
|
|
2383
|
-
username: asOptionalString(args.username),
|
|
2384
|
-
as_user: asBool(args.as_user, false)
|
|
2556
|
+
write(SLACK_WRITES.conversationsOpen, (args, actor, delta) => domain.conversationsOpen({ users: args.users, channel: args.channel, return_im: args.return_im }, actor, delta), (result) => !result.already_open);
|
|
2557
|
+
write(SLACK_WRITES.conversationsSetTopic, (args, actor, delta) => domain.conversationsSetTopic({ channel: args.channel, topic: args.topic }, actor, delta));
|
|
2558
|
+
write(SLACK_WRITES.conversationsSetPurpose, (args, actor, delta) => domain.conversationsSetPurpose({ channel: args.channel, purpose: args.purpose }, actor, delta));
|
|
2559
|
+
write(SLACK_WRITES.chatPostMessage, (args, actor, delta) => domain.chatPostMessage({
|
|
2560
|
+
channel: args.channel,
|
|
2561
|
+
text: args.text,
|
|
2562
|
+
blocks: args.blocks,
|
|
2563
|
+
attachments: args.attachments,
|
|
2564
|
+
thread_ts: args.thread_ts,
|
|
2565
|
+
reply_broadcast: args.reply_broadcast,
|
|
2566
|
+
icon_emoji: args.icon_emoji,
|
|
2567
|
+
icon_url: args.icon_url,
|
|
2568
|
+
username: args.username,
|
|
2569
|
+
as_user: args.as_user
|
|
2385
2570
|
}, actor, delta));
|
|
2386
|
-
write(
|
|
2387
|
-
channel:
|
|
2388
|
-
ts:
|
|
2389
|
-
text:
|
|
2390
|
-
blocks:
|
|
2391
|
-
attachments:
|
|
2571
|
+
write(SLACK_WRITES.chatUpdate, (args, actor, delta) => domain.chatUpdate({
|
|
2572
|
+
channel: args.channel,
|
|
2573
|
+
ts: args.ts,
|
|
2574
|
+
text: args.text,
|
|
2575
|
+
blocks: args.blocks,
|
|
2576
|
+
attachments: args.attachments
|
|
2392
2577
|
}, actor, delta));
|
|
2393
|
-
write(
|
|
2394
|
-
write(
|
|
2395
|
-
channel:
|
|
2396
|
-
text:
|
|
2397
|
-
post_at:
|
|
2398
|
-
thread_ts:
|
|
2399
|
-
blocks:
|
|
2578
|
+
write(SLACK_WRITES.chatDelete, (args, actor, delta) => domain.chatDelete({ channel: args.channel, ts: args.ts }, actor, delta));
|
|
2579
|
+
write(SLACK_WRITES.chatScheduleMessage, (args, actor, delta) => domain.chatScheduleMessage({
|
|
2580
|
+
channel: args.channel,
|
|
2581
|
+
text: args.text,
|
|
2582
|
+
post_at: args.post_at,
|
|
2583
|
+
thread_ts: args.thread_ts,
|
|
2584
|
+
blocks: args.blocks
|
|
2400
2585
|
}, actor, delta));
|
|
2401
|
-
write(
|
|
2402
|
-
write(
|
|
2403
|
-
write(
|
|
2404
|
-
read(
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
cursor: asOptionalString(args.cursor),
|
|
2411
|
-
limit: optNum(args.limit, 100),
|
|
2412
|
-
include_locale: asBool(args.include_locale, false),
|
|
2413
|
-
team_id: asOptionalString(args.team_id)
|
|
2586
|
+
write(SLACK_WRITES.chatDeleteScheduledMessage, (args, actor, delta) => domain.chatDeleteScheduledMessage({ channel: args.channel, scheduled_message_id: args.scheduled_message_id }, actor, delta));
|
|
2587
|
+
write(SLACK_WRITES.reactionsAdd, (args, actor, delta) => domain.reactionsAdd({ channel: args.channel, timestamp: args.timestamp, name: args.name }, actor, delta));
|
|
2588
|
+
write(SLACK_WRITES.reactionsRemove, (args, actor, delta) => domain.reactionsRemove({ channel: args.channel, timestamp: args.timestamp, name: args.name }, actor, delta));
|
|
2589
|
+
read(SLACK_READS.reactionsGet, (args, actor) => domain.reactionsGet({ channel: args.channel, timestamp: args.timestamp, full: args.full }, actor));
|
|
2590
|
+
read(SLACK_READS.usersList, (args) => domain.usersList({
|
|
2591
|
+
cursor: args.cursor,
|
|
2592
|
+
limit: args.limit,
|
|
2593
|
+
include_locale: args.include_locale,
|
|
2594
|
+
team_id: args.team_id
|
|
2414
2595
|
}));
|
|
2415
|
-
read(
|
|
2416
|
-
read(
|
|
2417
|
-
read(
|
|
2418
|
-
write(
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
count: optNum(args.count, 20),
|
|
2430
|
-
page: optNum(args.page, 1),
|
|
2431
|
-
sort: asOptionalString(args.sort),
|
|
2432
|
-
sort_dir: asOptionalString(args.sort_dir),
|
|
2433
|
-
highlight: asBool(args.highlight, false)
|
|
2596
|
+
read(SLACK_READS.usersInfo, (args) => domain.usersInfo({ user: args.user, include_locale: args.include_locale }));
|
|
2597
|
+
read(SLACK_READS.usersLookupByEmail, (args) => domain.usersLookupByEmail({ email: args.email }));
|
|
2598
|
+
read(SLACK_READS.usersProfileGet, (args, actor) => domain.usersProfileGet({ user: args.user, include_labels: args.include_labels }, actor));
|
|
2599
|
+
write(SLACK_WRITES.usersProfileSet, (args, actor, delta) => domain.usersProfileSet({ user: args.user, profile: args.profile, name: args.name, value: args.value }, actor, delta));
|
|
2600
|
+
write(SLACK_WRITES.pinsAdd, (args, actor, delta) => domain.pinsAdd({ channel: args.channel, timestamp: args.timestamp }, actor, delta));
|
|
2601
|
+
write(SLACK_WRITES.pinsRemove, (args, actor, delta) => domain.pinsRemove({ channel: args.channel, timestamp: args.timestamp }, actor, delta));
|
|
2602
|
+
read(SLACK_READS.pinsList, (args, actor) => domain.pinsList({ channel: args.channel }, actor));
|
|
2603
|
+
read(SLACK_READS.searchMessages, (args, actor) => domain.searchMessages({
|
|
2604
|
+
query: args.query,
|
|
2605
|
+
count: args.count,
|
|
2606
|
+
page: args.page,
|
|
2607
|
+
sort: args.sort,
|
|
2608
|
+
sort_dir: args.sort_dir,
|
|
2609
|
+
highlight: args.highlight
|
|
2434
2610
|
}, actor));
|
|
2435
|
-
write(
|
|
2436
|
-
channels:
|
|
2437
|
-
channel:
|
|
2438
|
-
filename:
|
|
2439
|
-
title:
|
|
2440
|
-
filetype:
|
|
2441
|
-
content:
|
|
2442
|
-
initial_comment:
|
|
2443
|
-
thread_ts:
|
|
2611
|
+
write(SLACK_WRITES.filesUpload, (args, actor, delta) => domain.filesUpload({
|
|
2612
|
+
channels: args.channels,
|
|
2613
|
+
channel: args.channel,
|
|
2614
|
+
filename: args.filename,
|
|
2615
|
+
title: args.title,
|
|
2616
|
+
filetype: args.filetype,
|
|
2617
|
+
content: args.content,
|
|
2618
|
+
initial_comment: args.initial_comment,
|
|
2619
|
+
thread_ts: args.thread_ts
|
|
2444
2620
|
}, actor, delta));
|
|
2445
|
-
read(
|
|
2446
|
-
read(
|
|
2447
|
-
channel:
|
|
2448
|
-
user:
|
|
2449
|
-
count:
|
|
2450
|
-
page:
|
|
2451
|
-
types:
|
|
2621
|
+
read(SLACK_READS.filesInfo, (args) => domain.filesInfo({ file: args.file }));
|
|
2622
|
+
read(SLACK_READS.filesList, (args) => domain.filesList({
|
|
2623
|
+
channel: args.channel,
|
|
2624
|
+
user: args.user,
|
|
2625
|
+
count: args.count,
|
|
2626
|
+
page: args.page,
|
|
2627
|
+
types: args.types
|
|
2452
2628
|
}));
|
|
2453
|
-
write(
|
|
2454
|
-
write(
|
|
2455
|
-
channel_id:
|
|
2456
|
-
title:
|
|
2457
|
-
type:
|
|
2458
|
-
link:
|
|
2459
|
-
emoji:
|
|
2460
|
-
entity_id:
|
|
2629
|
+
write(SLACK_WRITES.filesDelete, (args, actor, delta) => domain.filesDelete({ file: args.file }, actor, delta));
|
|
2630
|
+
write(SLACK_WRITES.bookmarksAdd, (args, actor, delta) => domain.bookmarksAdd({
|
|
2631
|
+
channel_id: args.channel_id,
|
|
2632
|
+
title: args.title,
|
|
2633
|
+
type: args.type,
|
|
2634
|
+
link: args.link,
|
|
2635
|
+
emoji: args.emoji,
|
|
2636
|
+
entity_id: args.entity_id
|
|
2461
2637
|
}, actor, delta));
|
|
2462
|
-
write(
|
|
2463
|
-
read(
|
|
2464
|
-
read(
|
|
2465
|
-
write(
|
|
2466
|
-
title:
|
|
2638
|
+
write(SLACK_WRITES.bookmarksRemove, (args, actor, delta) => domain.bookmarksRemove({ channel_id: args.channel_id, bookmark_id: args.bookmark_id }, actor, delta));
|
|
2639
|
+
read(SLACK_READS.bookmarksList, (args) => domain.bookmarksList({ channel_id: args.channel_id }));
|
|
2640
|
+
read(SLACK_READS.teamInfo, (args) => domain.teamInfo({ team: args.team }));
|
|
2641
|
+
write(SLACK_WRITES.canvasesCreate, (args, actor, delta) => domain.canvasesCreate({
|
|
2642
|
+
title: args.title,
|
|
2467
2643
|
document_content: args.document_content,
|
|
2468
|
-
channel_id:
|
|
2644
|
+
channel_id: args.channel_id
|
|
2469
2645
|
}, actor, delta));
|
|
2470
|
-
write(
|
|
2471
|
-
write(
|
|
2472
|
-
read(
|
|
2646
|
+
write(SLACK_WRITES.canvasesEdit, (args, actor, delta) => domain.canvasesEdit({ canvas_id: args.canvas_id, changes: args.changes }, actor, delta));
|
|
2647
|
+
write(SLACK_WRITES.canvasesDelete, (args, actor, delta) => domain.canvasesDelete({ canvas_id: args.canvas_id }, actor, delta));
|
|
2648
|
+
read(SLACK_READS.emojiList, (args) => domain.emojiList({ include_categories: args.include_categories }));
|
|
2473
2649
|
}
|
|
2474
2650
|
|
|
2475
2651
|
// ../packages/twin-slack/dist/fixtures/mcp-tools-list.meta.json
|