@wirecat/slack-cli 0.0.0-stage → 0.2.0
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/CHANGELOG.md +121 -0
- package/LICENSE +204 -0
- package/README.md +131 -2
- package/contracts/wirecat.json +5526 -0
- package/dist/bin/slack.d.ts +3 -0
- package/dist/bin/slack.d.ts.map +1 -0
- package/dist/bin/slack.js +40 -0
- package/dist/bin/slack.js.map +1 -0
- package/dist/bundle/agent-GOFXFUQP.js +37 -0
- package/dist/bundle/all-profiles-4C7VOT2D.js +320 -0
- package/dist/bundle/anthropic-ZD66TC5S.js +91 -0
- package/dist/bundle/app-server-QNCVEDMY.js +249 -0
- package/dist/bundle/bun-2FULBYXS.js +169 -0
- package/dist/bundle/bun-sqlite-PMS26ZUT.js +76 -0
- package/dist/bundle/chunk-2LB5BWC4.js +362 -0
- package/dist/bundle/chunk-2ZEYRHZV.js +18 -0
- package/dist/bundle/chunk-3IJ3THPV.js +7 -0
- package/dist/bundle/chunk-3IZF5ENR.js +61 -0
- package/dist/bundle/chunk-4HSVEQ3R.js +29 -0
- package/dist/bundle/chunk-4QPMHVM5.js +1007 -0
- package/dist/bundle/chunk-53LIHHXC.js +16 -0
- package/dist/bundle/chunk-5F36CXDM.js +794 -0
- package/dist/bundle/chunk-5LPREGD3.js +12636 -0
- package/dist/bundle/chunk-5R5YRYIP.js +1148 -0
- package/dist/bundle/chunk-5RSQTG7L.js +388 -0
- package/dist/bundle/chunk-5SXZETJF.js +170 -0
- package/dist/bundle/chunk-6PDQP5RM.js +50 -0
- package/dist/bundle/chunk-75BLNPN3.js +1197 -0
- package/dist/bundle/chunk-7BEO72EN.js +131 -0
- package/dist/bundle/chunk-7F6RNAIM.js +230 -0
- package/dist/bundle/chunk-AG7FP64Z.js +77 -0
- package/dist/bundle/chunk-BRXTN5LJ.js +338 -0
- package/dist/bundle/chunk-CABZAU37.js +319 -0
- package/dist/bundle/chunk-CCOSG3F2.js +24616 -0
- package/dist/bundle/chunk-CDTZSFTN.js +58 -0
- package/dist/bundle/chunk-CMZBCWND.js +1246 -0
- package/dist/bundle/chunk-CRQEEJNF.js +185 -0
- package/dist/bundle/chunk-CWYU4R65.js +358 -0
- package/dist/bundle/chunk-CZFR6JQX.js +52 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DVHX7R54.js +4072 -0
- package/dist/bundle/chunk-DYKOG7QR.js +9596 -0
- package/dist/bundle/chunk-ECDI42G6.js +100 -0
- package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
- package/dist/bundle/chunk-ELY2TLCY.js +259 -0
- package/dist/bundle/chunk-ERRVUVKR.js +156 -0
- package/dist/bundle/chunk-FBWR4E5D.js +353 -0
- package/dist/bundle/chunk-GKS6KL57.js +6848 -0
- package/dist/bundle/chunk-H2COZZ55.js +2787 -0
- package/dist/bundle/chunk-HGXTEK7R.js +82 -0
- package/dist/bundle/chunk-HXLXM7HV.js +726 -0
- package/dist/bundle/chunk-IPP4N6HD.js +24 -0
- package/dist/bundle/chunk-IWTVR7S7.js +53 -0
- package/dist/bundle/chunk-IYJH75D4.js +63 -0
- package/dist/bundle/chunk-JCZLRT4Z.js +39 -0
- package/dist/bundle/chunk-JGRWMR5H.js +123 -0
- package/dist/bundle/chunk-JYRYQJBN.js +633 -0
- package/dist/bundle/chunk-KIKLDI74.js +161 -0
- package/dist/bundle/chunk-L4WO3XH6.js +2020 -0
- package/dist/bundle/chunk-LQDNUAK3.js +274 -0
- package/dist/bundle/chunk-LV5ONLQH.js +38 -0
- package/dist/bundle/chunk-M27Z23OZ.js +23 -0
- package/dist/bundle/chunk-M5XTZHXM.js +142 -0
- package/dist/bundle/chunk-MJBEGUIZ.js +76 -0
- package/dist/bundle/chunk-N4WOLGIV.js +2333 -0
- package/dist/bundle/chunk-N5K4OHPT.js +206 -0
- package/dist/bundle/chunk-NYAPUET7.js +108 -0
- package/dist/bundle/chunk-P4IFLOIK.js +218 -0
- package/dist/bundle/chunk-P6G2QTCD.js +288 -0
- package/dist/bundle/chunk-PL5P7UKW.js +25216 -0
- package/dist/bundle/chunk-PU7R6XNV.js +80 -0
- package/dist/bundle/chunk-QLLBACDR.js +72 -0
- package/dist/bundle/chunk-QP7XN5KX.js +407 -0
- package/dist/bundle/chunk-QY2F6A3D.js +557 -0
- package/dist/bundle/chunk-RLIT7VAZ.js +66 -0
- package/dist/bundle/chunk-S4UUN6LD.js +1410 -0
- package/dist/bundle/chunk-SKGAKI62.js +86 -0
- package/dist/bundle/chunk-SQMZP5MA.js +66653 -0
- package/dist/bundle/chunk-UB6NTICY.js +95 -0
- package/dist/bundle/chunk-UBHQO5HV.js +778 -0
- package/dist/bundle/chunk-UM4RKO24.js +106 -0
- package/dist/bundle/chunk-VAHFY732.js +1068 -0
- package/dist/bundle/chunk-VGDM4C3F.js +188 -0
- package/dist/bundle/chunk-VOUAKCPM.js +41181 -0
- package/dist/bundle/chunk-WCCFJ4Q6.js +3736 -0
- package/dist/bundle/chunk-WV6EXRDV.js +46 -0
- package/dist/bundle/chunk-WVAT5TGY.js +334 -0
- package/dist/bundle/chunk-WW76JMKE.js +1243 -0
- package/dist/bundle/chunk-XXOMUKC6.js +54 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YDO6RJ2P.js +1337 -0
- package/dist/bundle/chunk-ZBCFZCJW.js +388 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-BWGRUY6L.js +37 -0
- package/dist/bundle/command-server-entry-BATOWE3Y.js +166 -0
- package/dist/bundle/decode-MZQGYXJH.js +297 -0
- package/dist/bundle/definitions-3EONB23J.js +8600 -0
- package/dist/bundle/dispatch-NYC4ARWX.js +411 -0
- package/dist/bundle/dist-AMLBQVKM.js +7577 -0
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/echarts-7OYGL2GW.js +42501 -0
- package/dist/bundle/embed-4I25DVKZ.js +38 -0
- package/dist/bundle/embedder-YXKQHAZO.js +111 -0
- package/dist/bundle/emoji-4LYX3GOS.js +4271 -0
- package/dist/bundle/failure-3YOVYZTX.js +25 -0
- package/dist/bundle/first-run-2VL2BOV7.js +29 -0
- package/dist/bundle/first-screen-C7FIWZL2.js +37 -0
- package/dist/bundle/instructions-UMNDHXG2.js +11 -0
- package/dist/bundle/mcp-V27RHILF.js +167 -0
- package/dist/bundle/meeting-combined-LS6XO4JH.js +24 -0
- package/dist/bundle/meeting-model-VIR465CY.js +25 -0
- package/dist/bundle/meeting-semantic-H5J3OOF2.js +22 -0
- package/dist/bundle/node-JJ3WDCNJ.js +2340 -0
- package/dist/bundle/node-PYFPGL4E.js +176 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-LFWPGDVP.js +74 -0
- package/dist/bundle/oauth-42VCSIVL.js +20 -0
- package/dist/bundle/open-XJ5R5LHC.js +23 -0
- package/dist/bundle/openai-RZBLV4HG.js +238 -0
- package/dist/bundle/process-DD6H3K7L.js +91 -0
- package/dist/bundle/program-OIYIBNSA.js +35443 -0
- package/dist/bundle/prompt-NQRDM5LY.js +17 -0
- package/dist/bundle/recognize-EM7H2IZS.js +26 -0
- package/dist/bundle/remote-Z6NU6QQA.js +31 -0
- package/dist/bundle/rerank-PNPCSPNF.js +52 -0
- package/dist/bundle/schemas-JMKNP4U3.js +2765 -0
- package/dist/bundle/serve-SQVGX76J.js +199 -0
- package/dist/bundle/server-NPJH45FZ.js +212 -0
- package/dist/bundle/server-Z4ZMGRAH.js +79 -0
- package/dist/bundle/slack.js +184 -0
- package/dist/bundle/sqlite-runtime-F3AJGAPN.js +20 -0
- package/dist/bundle/state-JT7ZFSXN.js +36 -0
- package/dist/bundle/store-FXGMHRF3.js +181 -0
- package/dist/bundle/store-J5ZL2USR.js +295 -0
- package/dist/bundle/store-maintenance-command-TIHOIKLZ.js +66 -0
- package/dist/bundle/surface-NW6T5OR6.js +65 -0
- package/dist/commands/api.d.ts +7 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +49 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/session.d.ts +7 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +26 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/config.d.ts +24 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +75 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +59 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +75 -0
- package/dist/context.js.map +1 -0
- package/dist/generated/definitions.d.ts +3 -0
- package/dist/generated/definitions.d.ts.map +1 -0
- package/dist/generated/definitions.js +8596 -0
- package/dist/generated/definitions.js.map +1 -0
- package/dist/generated/emoji.d.ts +2 -0
- package/dist/generated/emoji.d.ts.map +1 -0
- package/dist/generated/emoji.js +4265 -0
- package/dist/generated/emoji.js.map +1 -0
- package/dist/generated/manifest.d.ts +6 -0
- package/dist/generated/manifest.d.ts.map +1 -0
- package/dist/generated/manifest.js +6139 -0
- package/dist/generated/manifest.js.map +1 -0
- package/dist/generated/schemas.d.ts +631 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +2426 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/generated/types.d.ts +3220 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +5 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/identity.d.ts +29 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +32 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/messenger.d.ts +12 -0
- package/dist/messenger.d.ts.map +1 -0
- package/dist/messenger.js +184 -0
- package/dist/messenger.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +116 -0
- package/dist/program.js.map +1 -0
- package/dist/reasons.d.ts +7 -0
- package/dist/reasons.d.ts.map +1 -0
- package/dist/reasons.js +20 -0
- package/dist/reasons.js.map +1 -0
- package/dist/setup/flow.d.ts +2 -0
- package/dist/setup/flow.d.ts.map +1 -0
- package/dist/setup/flow.js +83 -0
- package/dist/setup/flow.js.map +1 -0
- package/dist/setup/guide.d.ts +6 -0
- package/dist/setup/guide.d.ts.map +1 -0
- package/dist/setup/guide.js +13 -0
- package/dist/setup/guide.js.map +1 -0
- package/dist/setup/texts.d.ts +24 -0
- package/dist/setup/texts.d.ts.map +1 -0
- package/dist/setup/texts.js +24 -0
- package/dist/setup/texts.js.map +1 -0
- package/dist/slack/adapter.d.ts +36 -0
- package/dist/slack/adapter.d.ts.map +1 -0
- package/dist/slack/adapter.js +574 -0
- package/dist/slack/adapter.js.map +1 -0
- package/dist/slack/app-manifest.d.ts +25 -0
- package/dist/slack/app-manifest.d.ts.map +1 -0
- package/dist/slack/app-manifest.js +51 -0
- package/dist/slack/app-manifest.js.map +1 -0
- package/dist/slack/client.d.ts +45 -0
- package/dist/slack/client.d.ts.map +1 -0
- package/dist/slack/client.js +236 -0
- package/dist/slack/client.js.map +1 -0
- package/dist/slack/map.d.ts +437 -0
- package/dist/slack/map.d.ts.map +1 -0
- package/dist/slack/map.js +411 -0
- package/dist/slack/map.js.map +1 -0
- package/dist/slack/mrkdwn.d.ts +9 -0
- package/dist/slack/mrkdwn.d.ts.map +1 -0
- package/dist/slack/mrkdwn.js +56 -0
- package/dist/slack/mrkdwn.js.map +1 -0
- package/dist/slack/search.d.ts +24 -0
- package/dist/slack/search.d.ts.map +1 -0
- package/dist/slack/search.js +99 -0
- package/dist/slack/search.js.map +1 -0
- package/dist/slack/threads.d.ts +28 -0
- package/dist/slack/threads.d.ts.map +1 -0
- package/dist/slack/threads.js +56 -0
- package/dist/slack/threads.js.map +1 -0
- package/dist/slack/tokens.d.ts +17 -0
- package/dist/slack/tokens.d.ts.map +1 -0
- package/dist/slack/tokens.js +27 -0
- package/dist/slack/tokens.js.map +1 -0
- package/dist/slack/writes.d.ts +43 -0
- package/dist/slack/writes.d.ts.map +1 -0
- package/dist/slack/writes.js +277 -0
- package/dist/slack/writes.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +89 -4
- package/skills/slack-cli/SKILL.md +117 -0
- package/skills/slack-cli/references/api/api-admin.md +541 -0
- package/skills/slack-cli/references/api/api-api.md +13 -0
- package/skills/slack-cli/references/api/api-apps.md +78 -0
- package/skills/slack-cli/references/api/api-auth.md +18 -0
- package/skills/slack-cli/references/api/api-bots.md +12 -0
- package/skills/slack-cli/references/api/api-calls.md +68 -0
- package/skills/slack-cli/references/api/api-chat.md +123 -0
- package/skills/slack-cli/references/api/api-conversations.md +230 -0
- package/skills/slack-cli/references/api/api-dialog.md +13 -0
- package/skills/slack-cli/references/api/api-dnd.md +31 -0
- package/skills/slack-cli/references/api/api-emoji.md +8 -0
- package/skills/slack-cli/references/api/api-files.md +120 -0
- package/skills/slack-cli/references/api/api-migration.md +14 -0
- package/skills/slack-cli/references/api/api-pins.md +37 -0
- package/skills/slack-cli/references/api/api-reactions.md +58 -0
- package/skills/slack-cli/references/api/api-reminders.md +51 -0
- package/skills/slack-cli/references/api/api-search.md +18 -0
- package/skills/slack-cli/references/api/api-stars.md +42 -0
- package/skills/slack-cli/references/api/api-team.md +55 -0
- package/skills/slack-cli/references/api/api-usergroups.md +80 -0
- package/skills/slack-cli/references/api/api-users.md +101 -0
- package/skills/slack-cli/references/api/api-views.md +46 -0
- package/skills/slack-cli/references/api/api-workflows.md +36 -0
- package/skills/slack-cli/references/api.md +35 -0
|
@@ -0,0 +1 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|
2
|
+
/**
|
|
3
|
+
* Every reason slack raises beyond cli-core's, so an agent branches on it (WC-OUT-15). `slack_error` is Slack's own
|
|
4
|
+
* code, from the method's page on docs.slack.dev.
|
|
5
|
+
*/
|
|
6
|
+
export declare const REASONS: ErrorReason[];
|
|
7
|
+
//# sourceMappingURL=reasons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasons.d.ts","sourceRoot":"","sources":["../src/reasons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAE7E;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,WAAW,EAiBhC,CAAA"}
|
package/dist/reasons.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineReasons } from "@wirecat/cli-base/standards";
|
|
2
|
+
/**
|
|
3
|
+
* Every reason slack raises beyond cli-core's, so an agent branches on it (WC-OUT-15). `slack_error` is Slack's own
|
|
4
|
+
* code, from the method's page on docs.slack.dev.
|
|
5
|
+
*/
|
|
6
|
+
export const REASONS = defineReasons([
|
|
7
|
+
// chat.update's cant_update_message, chat.delete's cant_delete_message.
|
|
8
|
+
["message.not-yours", "permission_error", "Slack lets this account change only messages it may change"],
|
|
9
|
+
// chat.update's edit_window_closed.
|
|
10
|
+
["message.edit-window-closed", "permission_error", "the workspace no longer lets this message be edited"],
|
|
11
|
+
// chat.postMessage's and chat.update's msg_too_long.
|
|
12
|
+
["message.too-long", "validation_error", "the message is longer than Slack takes"],
|
|
13
|
+
// chat.postMessage's not_in_channel.
|
|
14
|
+
["chat.not-joined", "permission_error", "this account is not in the chat"],
|
|
15
|
+
// chat.postMessage's and conversations.join's is_archived.
|
|
16
|
+
["chat.archived", "validation_error", "the chat is archived"],
|
|
17
|
+
// chat.postMessage's restricted_action and restricted_action_* codes.
|
|
18
|
+
["chat.restricted", "permission_error", "a workspace or channel setting stops this action"],
|
|
19
|
+
].map(([reason, code, message]) => ({ reason, code, message, details: ["slack_error"] })));
|
|
20
|
+
//# sourceMappingURL=reasons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasons.js","sourceRoot":"","sources":["../src/reasons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,6BAA6B,CAAA;AAE7E;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAkB,aAAa,CAE/C;IACE,wEAAwE;IACxE,CAAC,mBAAmB,EAAE,kBAAkB,EAAE,4DAA4D,CAAC;IACvG,oCAAoC;IACpC,CAAC,4BAA4B,EAAE,kBAAkB,EAAE,qDAAqD,CAAC;IACzG,qDAAqD;IACrD,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,wCAAwC,CAAC;IAClF,qCAAqC;IACrC,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,iCAAiC,CAAC;IAC1E,2DAA2D;IAC3D,CAAC,eAAe,EAAE,kBAAkB,EAAE,sBAAsB,CAAC;IAC7D,sEAAsE;IACtE,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,kDAAkD,CAAC;CAE9F,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAC1F,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/setup/flow.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,UAAU,uCA+DrB,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
|
+
import { defineSetup, refuseOffline } from "@wirecat/cli-core/cli";
|
|
3
|
+
import { configuration } from "../config.js";
|
|
4
|
+
import { slackFor } from "../context.js";
|
|
5
|
+
import { IDENTITY, SERVICE } from "../identity.js";
|
|
6
|
+
import { APP_LINK, APPS_LINK } from "../slack/app-manifest.js";
|
|
7
|
+
import { refuseOtherTokens, whoAmI } from "../slack/tokens.js";
|
|
8
|
+
import { en } from "./texts.js";
|
|
9
|
+
/** The same proof `session start` runs: the token is a user token, and `auth.test` says whose it is. */
|
|
10
|
+
const check = async ({ command, secrets }) => {
|
|
11
|
+
refuseOffline(command, SERVICE);
|
|
12
|
+
const token = secrets.token?.trim();
|
|
13
|
+
if (!token)
|
|
14
|
+
throw new CliError("validation_error", "paste the User OAuth Token", { param: "token" });
|
|
15
|
+
refuseOtherTokens(token);
|
|
16
|
+
const { id, account } = await whoAmI(slackFor(command, token));
|
|
17
|
+
return { ...account, keep: { secrets: { token }, account: id } };
|
|
18
|
+
};
|
|
19
|
+
export const slackSetup = defineSetup({
|
|
20
|
+
app: IDENTITY,
|
|
21
|
+
configuration,
|
|
22
|
+
check,
|
|
23
|
+
start: "app",
|
|
24
|
+
steps: {
|
|
25
|
+
app: {
|
|
26
|
+
title: "app.title",
|
|
27
|
+
blocks: [
|
|
28
|
+
{ type: "text", text: "app.intro" },
|
|
29
|
+
{ type: "text", text: "app.steps" },
|
|
30
|
+
{ type: "link", href: APP_LINK, text: "app.link" },
|
|
31
|
+
{ type: "text", text: "app.by-hand" },
|
|
32
|
+
],
|
|
33
|
+
next: "install",
|
|
34
|
+
},
|
|
35
|
+
install: {
|
|
36
|
+
title: "install.title",
|
|
37
|
+
blocks: [
|
|
38
|
+
{ type: "text", text: "install.steps" },
|
|
39
|
+
{ type: "link", href: APPS_LINK, text: "install.link" },
|
|
40
|
+
{ type: "note", role: "tip", text: "install.admin" },
|
|
41
|
+
],
|
|
42
|
+
next: "token",
|
|
43
|
+
},
|
|
44
|
+
token: {
|
|
45
|
+
title: "token.title",
|
|
46
|
+
blocks: [
|
|
47
|
+
{ type: "text", text: "token.where" },
|
|
48
|
+
{ type: "note", role: "warning", text: "token.bot" },
|
|
49
|
+
{ type: "input", id: "token", secret: "token", input: "password", label: "token.label", hint: "token.hint" },
|
|
50
|
+
],
|
|
51
|
+
next: "check",
|
|
52
|
+
},
|
|
53
|
+
check: {
|
|
54
|
+
kind: "run",
|
|
55
|
+
title: "check.title",
|
|
56
|
+
action: "apply",
|
|
57
|
+
blocks: [{ type: "text", text: "check.body" }],
|
|
58
|
+
next: [
|
|
59
|
+
{ when: { result: "check", is: "ok" }, to: "done" },
|
|
60
|
+
{ when: { result: "check", error: "authentication_error" }, to: "token" },
|
|
61
|
+
{ when: { result: "check", error: "validation_error" }, to: "token" },
|
|
62
|
+
{ to: "failed" },
|
|
63
|
+
],
|
|
64
|
+
back: false,
|
|
65
|
+
},
|
|
66
|
+
failed: {
|
|
67
|
+
kind: "done",
|
|
68
|
+
title: "failed.title",
|
|
69
|
+
blocks: [{ type: "note", role: "danger", text: "failed.body" }],
|
|
70
|
+
back: true,
|
|
71
|
+
},
|
|
72
|
+
done: {
|
|
73
|
+
kind: "done",
|
|
74
|
+
title: "done.title",
|
|
75
|
+
blocks: [
|
|
76
|
+
{ type: "text", text: "done.body" },
|
|
77
|
+
{ type: "code", code: "slk <profile> chats list\nslk <profile> messages sync '#general'", copy: true },
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
texts: { en },
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.js","sourceRoot":"","sources":["../../src/setup/flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAmB,MAAM,uBAAuB,CAAA;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA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E,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE;gBACrE,EAAE,EAAE,EAAE,QAAQ,EAAE;aACjB;YACD,IAAI,EAAE,KAAK;SACZ;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,cAAc;YACrB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;YAC/D,IAAI,EAAE,IAAI;SACX;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE;gBACN,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE;gBACnC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kEAAkE,EAAE,IAAI,EAAE,IAAI,EAAE;aACvG;SACF;KACF;IACD,KAAK,EAAE,EAAE,EAAE,EAAE;CACd,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The setup flow's steps as one text for `session start`, so the terminal and WireCat Desktop say the same. It is a
|
|
3
|
+
* setup text's restricted Markdown: cli-core prints it plainly, its links drawn as links where the terminal can.
|
|
4
|
+
*/
|
|
5
|
+
export declare const TOKEN_GUIDE: string;
|
|
6
|
+
//# sourceMappingURL=guide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide.d.ts","sourceRoot":"","sources":["../../src/setup/guide.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,WAAW,QAKV,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { APP_LINK } from "../slack/app-manifest.js";
|
|
2
|
+
import { en } from "./texts.js";
|
|
3
|
+
/**
|
|
4
|
+
* The setup flow's steps as one text for `session start`, so the terminal and WireCat Desktop say the same. It is a
|
|
5
|
+
* setup text's restricted Markdown: cli-core prints it plainly, its links drawn as links where the terminal can.
|
|
6
|
+
*/
|
|
7
|
+
export const TOKEN_GUIDE = [
|
|
8
|
+
`## How to get the token\n\n${en["app.intro"]}`,
|
|
9
|
+
`## ${en["app.title"]}\n\n${en["app.steps"]}\n\n[${en["app.link"]}](${APP_LINK})\n\n${en["app.by-hand"]}`,
|
|
10
|
+
`## ${en["install.title"]}\n\n${en["install.steps"]}\n\n${en["install.admin"]}`,
|
|
11
|
+
`## ${en["token.title"]}\n\n${en["token.where"]} ${en["token.bot"]}`,
|
|
12
|
+
].join("\n\n");
|
|
13
|
+
//# sourceMappingURL=guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide.js","sourceRoot":"","sources":["../../src/setup/guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAE/B;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,8BAA8B,EAAE,CAAC,WAAW,CAAC,EAAE;IAC/C,MAAM,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,KAAK,QAAQ,QAAQ,EAAE,CAAC,aAAa,CAAC,EAAE;IACzG,MAAM,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,eAAe,CAAC,EAAE;IAC/E,MAAM,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE;CACrE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** The setup flow's English texts, by key. `session start` prints the same steps (src/setup/guide.ts). */
|
|
2
|
+
export declare const en: {
|
|
3
|
+
"app.title": string;
|
|
4
|
+
"app.intro": string;
|
|
5
|
+
"app.steps": string;
|
|
6
|
+
"app.link": string;
|
|
7
|
+
"app.by-hand": string;
|
|
8
|
+
"install.title": string;
|
|
9
|
+
"install.steps": string;
|
|
10
|
+
"install.link": string;
|
|
11
|
+
"install.admin": string;
|
|
12
|
+
"token.title": string;
|
|
13
|
+
"token.where": string;
|
|
14
|
+
"token.label": string;
|
|
15
|
+
"token.hint": string;
|
|
16
|
+
"token.bot": string;
|
|
17
|
+
"check.title": string;
|
|
18
|
+
"check.body": string;
|
|
19
|
+
"failed.title": string;
|
|
20
|
+
"failed.body": string;
|
|
21
|
+
"done.title": string;
|
|
22
|
+
"done.body": string;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=texts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"texts.d.ts","sourceRoot":"","sources":["../../src/setup/texts.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,eAAO,MAAM,EAAE;IACb,WAAW;IACX,WAAW;IAEX,WAAW;IAEX,UAAU;IACV,aAAa;IAEb,eAAe;IACf,eAAe;IAEf,cAAc;IACd,eAAe;IAEf,aAAa;IACb,aAAa;IAEb,aAAa;IACb,YAAY;IACZ,WAAW;IAEX,aAAa;IACb,YAAY;IACZ,cAAc;IACd,aAAa;IAEb,YAAY;IACZ,WAAW;CACZ,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** The setup flow's English texts, by key. `session start` prints the same steps (src/setup/guide.ts). */
|
|
2
|
+
export const en = {
|
|
3
|
+
"app.title": "Make your own Slack app",
|
|
4
|
+
"app.intro": "Slack lets a program read your messages only through an app installed in your workspace. So you make a small app for slk yourself: it takes about three minutes, it belongs to you, and only you use it. Your messages and the token stay on this computer and go only to Slack. An app of your own also keeps Slack's full speed for reading history: Slack slows an app another company publishes outside its Marketplace to one read of 15 messages a minute.",
|
|
5
|
+
"app.steps": "1. Sign in to Slack in your browser, in the workspace slk should read: [slack.com/signin](https://slack.com/signin)\n2. Open the link below. Slack opens **Create New App** with slk's settings already filled in.\n3. Choose your workspace in the list and click **Next** until you see **Create**, then click **Create**. You do not need to change anything on the way.\n4. Slack opens the app's **Basic Information** page. Its Client ID, Client Secret, Signing Secret and Verification Token are not needed: the token you need comes in the next step.",
|
|
6
|
+
"app.link": "Create the app in Slack",
|
|
7
|
+
"app.by-hand": "If the link does not open the form: go to [api.slack.com/apps](https://api.slack.com/apps), click **Create New App**, then **From a manifest**, choose your workspace, and replace the text there with [slk's manifest](https://github.com/WireCatLabs/slack-cli/blob/main/docs/slack-app-manifest.json): on that page, click **Copy raw file** (the button with two squares above the text) and paste.",
|
|
8
|
+
"install.title": "Install the app and copy the token",
|
|
9
|
+
"install.steps": "1. On the app's page, in the menu on the left, click **OAuth & Permissions**. Lost the page? Open [api.slack.com/apps](https://api.slack.com/apps) and click **WireCat slk**.\n2. Click **Install to Workspace** (Slack may show your workspace's name in place of \"Workspace\"). Slack lists what slk may do as you: read and send messages, see people and files. Click **Allow**.\n3. You are back on **OAuth & Permissions**. Under **OAuth Tokens**, find **User OAuth Token**: it starts with `xoxp-`. Click **Copy**.",
|
|
10
|
+
"install.link": "Your Slack apps",
|
|
11
|
+
"install.admin": "If Slack offers to send a request in place of installing, only an administrator may install apps in this workspace. Send the request. Once they approve it, open **OAuth & Permissions** again and click **Install to Workspace**.",
|
|
12
|
+
"token.title": "Paste the token",
|
|
13
|
+
"token.where": "Paste the **User OAuth Token** you copied. It works like a password to your Slack, so slk checks it with Slack and keeps it in your system keyring.",
|
|
14
|
+
"token.label": "User OAuth Token",
|
|
15
|
+
"token.hint": "Starts with `xoxp-`. Kept in your system keyring or, without one, in a file only you can read.",
|
|
16
|
+
"token.bot": "Copy only the token that starts with `xoxp-`. slk refuses a bot token (`xoxb-`): a bot sees only the channels it is added to, and slk reads as you.",
|
|
17
|
+
"check.title": "Checking the token",
|
|
18
|
+
"check.body": "slk asks Slack whose the token is. It keeps the token only if Slack answers.",
|
|
19
|
+
"failed.title": "The check did not pass",
|
|
20
|
+
"failed.body": "Slack did not take the token, so nothing was saved. Copy the **User OAuth Token** again from **OAuth & Permissions** and check your internet connection.",
|
|
21
|
+
"done.title": "Connected",
|
|
22
|
+
"done.body": "The profile is ready. List your chats, then copy one into the local store to search it:",
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=texts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"texts.js","sourceRoot":"","sources":["../../src/setup/texts.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,WAAW,EAAE,yBAAyB;IACtC,WAAW,EACT,kcAAkc;IACpc,WAAW,EACT,kiBAAkiB;IACpiB,UAAU,EAAE,yBAAyB;IACrC,aAAa,EACX,yYAAyY;IAC3Y,eAAe,EAAE,oCAAoC;IACrD,eAAe,EACb,+fAA+f;IACjgB,cAAc,EAAE,iBAAiB;IACjC,eAAe,EACb,oOAAoO;IACtO,aAAa,EAAE,iBAAiB;IAChC,aAAa,EACX,qJAAqJ;IACvJ,aAAa,EAAE,kBAAkB;IACjC,YAAY,EAAE,gGAAgG;IAC9G,WAAW,EACT,qJAAqJ;IACvJ,aAAa,EAAE,oBAAoB;IACnC,YAAY,EAAE,8EAA8E;IAC5F,cAAc,EAAE,wBAAwB;IACxC,aAAa,EACX,0JAA0J;IAC5J,YAAY,EAAE,WAAW;IACzB,WAAW,EAAE,yFAAyF;CACvG,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type FetchLike } from "@wirecat/cli-base/http";
|
|
2
|
+
import type { MessengerAdapter } from "@wirecat/cli-core/cli";
|
|
3
|
+
import type { SlackClient } from "./client.js";
|
|
4
|
+
import { type Self } from "./map.js";
|
|
5
|
+
/** Slack's own cap on `conversations.history` (https://docs.slack.dev/reference/methods/conversations.history/). */
|
|
6
|
+
export declare const HISTORY_MOST = 999;
|
|
7
|
+
/** DMs and group DMs `inbox` counts: one conversations.info each, at the profile's pace. */
|
|
8
|
+
export declare const INBOX_INFO_MOST = 40;
|
|
9
|
+
/**
|
|
10
|
+
* How long `inbox` asks chats one by one. A command ends after 30 s and an agent's MCP call after about 60 (cli-core
|
|
11
|
+
* DEFAULT_COMMAND_MS); cli-core then reads each unread DM's history, so this leaves it half the time. At Tier 3's 50
|
|
12
|
+
* calls a minute, after a burst of 10, that is about 20 calls: 15 DMs and a few channels.
|
|
13
|
+
*/
|
|
14
|
+
export declare const INBOX_ASK_MS = 15000;
|
|
15
|
+
export interface SlackAdapterOptions {
|
|
16
|
+
slack: SlackClient;
|
|
17
|
+
token: string;
|
|
18
|
+
self: Self | undefined;
|
|
19
|
+
/** How many days back a sync looks for threads with new replies. */
|
|
20
|
+
threadWindowDays: number;
|
|
21
|
+
fetch?: FetchLike | undefined;
|
|
22
|
+
signal?: AbortSignal | undefined;
|
|
23
|
+
now?: () => number;
|
|
24
|
+
alsoToChannel?: boolean;
|
|
25
|
+
/** The channels `inbox` counts, as the owner named them (`inbox_channels`), or every channel (`inbox_all_channels`). */
|
|
26
|
+
inbox?: {
|
|
27
|
+
channels: readonly string[];
|
|
28
|
+
allChannels: boolean;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Slack's Web API as cli-core's messenger. Only reads for now; a write port is added beside the reads and through the
|
|
33
|
+
* same client. Every answer is mapped in `map.ts`.
|
|
34
|
+
*/
|
|
35
|
+
export declare const slackAdapter: (options: SlackAdapterOptions) => MessengerAdapter;
|
|
36
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/slack/adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,wBAAwB,CAAA;AAElE,OAAO,KAAK,EAAS,gBAAgB,EAAc,MAAM,uBAAuB,CAAA;AAEhF,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAwBL,KAAK,IAAI,EAQV,MAAM,UAAU,CAAA;AAKjB,oHAAoH;AACpH,eAAO,MAAM,YAAY,MAAM,CAAA;AAE/B,4FAA4F;AAC5F,eAAO,MAAM,eAAe,KAAK,CAAA;AAEjC;;;;GAIG;AACH,eAAO,MAAM,YAAY,QAAS,CAAA;AAKlC,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,WAAW,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,GAAG,SAAS,CAAA;IACtB,oEAAoE;IACpE,gBAAgB,EAAE,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;IAChC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,wHAAwH;IACxH,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,WAAW,EAAE,OAAO,CAAA;KAAE,CAAA;CAC9D;AAeD;;;GAGG;AACH,eAAO,MAAM,YAAY,YAAa,mBAAmB,KAAG,gBAmkB3D,CAAA"}
|