@skillcdn/console-plugin-messenger 0.0.0-stage → 0.1.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/package.json CHANGED
@@ -1,6 +1,45 @@
1
1
  {
2
2
  "name": "@skillcdn/console-plugin-messenger",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Messenger, a plugin of the SkillCDN Console: every message a plugin has for people, carried to the messengers an organization uses and back, Slack first; for HR, a leave form in the chat and the approval threaded with whoever decides.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "homepage": "https://github.com/skillcdn/console-plugins/tree/main/plugins/messenger#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/skillcdn/console-plugins.git",
11
+ "directory": "plugins/messenger"
12
+ },
13
+ "bugs": "https://github.com/skillcdn/console-plugins/issues",
14
+ "keywords": [
15
+ "skillcdn",
16
+ "console",
17
+ "console-plugin",
18
+ "messenger",
19
+ "slack",
20
+ "notifications"
21
+ ],
22
+ "files": [
23
+ "dist",
24
+ "skills",
25
+ "SKILLCDN.md",
26
+ "console-plugin.json"
27
+ ],
28
+ "publishConfig": {
29
+ "access": "public"
30
+ },
31
+ "devDependencies": {
32
+ "@skillcdn/console": "^0.4.6",
33
+ "@types/node": "^24.19.1",
34
+ "esbuild": "^0.28.2",
35
+ "typescript": "^7.0.2",
36
+ "vitest": "^5.0.3"
37
+ },
38
+ "scripts": {
39
+ "build": "node build.mjs",
40
+ "typecheck": "tsc -p tsconfig.json --noEmit",
41
+ "test": "vitest run",
42
+ "check": "console-plugin check",
43
+ "clean": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\""
44
+ }
6
45
  }
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: messenger
3
+ description: "Keeps the console's messenger for whoever holds its role: connects the workspace's Slack through an app the plugin makes, says which plugin events go to which channel, matches people to their Slack accounts by email, and reads what was sent and why something was not. Use when a person asks to connect Slack, to send approved leave to a channel, to find out why someone gets no messages, or why a message did not go out."
4
+ license: MIT
5
+ metadata:
6
+ author: skillcdn
7
+ skillcdn:
8
+ translations:
9
+ ko:
10
+ title: "메신저 관리"
11
+ description: "메신저 담당을 위해 콘솔의 메신저를 관리합니다. 플러그인이 만드는 앱으로 워크스페이스의 Slack을 연결하고, 어떤 플러그인 알림을 어느 채널로 보낼지 정하고, 이메일로 사람을 Slack 계정과 맞추고, 무엇을 보냈고 무엇이 왜 안 갔는지 봅니다. Slack을 연결해 달라거나, 승인된 휴가를 채널에 올려 달라거나, 누가 왜 메시지를 못 받는지, 메시지가 왜 안 나갔는지 물을 때 쓰세요."
12
+ ---
13
+ # Keeping the messenger
14
+
15
+ The messenger carries what the console's plugins have for people to the organization's Slack, and brings back what people do there: for HR, a leave form in the chat and each approval threaded with the person and whoever decides. Whoever holds the role `messenger` keeps it: the connection, the routes, the matching. Everyone else meets it in Slack alone.
16
+
17
+ ## Commands
18
+
19
+ | Do | Command |
20
+ |---|---|
21
+ | See how the connection stands: the console's address, the secrets, the app, HR, the role asked of HR | `console plugin messenger status` |
22
+ | Make the Slack app, or bring it up to date, and get the address that installs it | `console plugin messenger connect [--language en|ko]` |
23
+ | Send a test message to yourself, or to a channel | `console plugin messenger test [--channel <id>]` |
24
+ | Uninstall the app from the workspace and delete it, to start again in this workspace or another | `console plugin messenger disconnect` |
25
+ | Match people to their Slack accounts by email now: everyone, or one person | `console plugin messenger match [--person <login>]` |
26
+ | See who is matched, and why the others are not | `console plugin messenger people [--state no_email|no_account|not_checked|matched] [--limit <n>]` |
27
+ | List the channels a route may name | `console plugin messenger channels [--search <words>]` |
28
+ | Send a kind of event to a channel | `console plugin messenger route <channel> [--kind hr:leave-approved] [--language en|ko] [--as person|app]` |
29
+ | List the routes | `console plugin messenger routes` |
30
+ | Take a route away | `console plugin messenger unroute <id>` |
31
+ | Read what was sent, passed over or failed | `console plugin messenger activity [--outcome sent|skipped|failed] [--limit <n>]` |
32
+
33
+ ## Connecting Slack, in order
34
+
35
+ 1. **The console's address.** Slack reaches the console over https at a public address. `status` says whether it can; a console on this machine, or on http, cannot be connected, and the deployment fixes that, not the agent.
36
+ 2. **The configuration token.** At api.slack.com/apps, under "Your App Configuration Tokens", someone who administers the Slack workspace generates a token for it; an administrator of the console pastes the access token as `slackConfigToken` and the refresh token as `slackConfigRefreshToken`, on the plugin's settings page or with `console plugin messenger secret slackConfigToken` and `console plugin messenger secret slackConfigRefreshToken`, the value on standard input. The plugin renews them itself from then on.
37
+ 3. **The app.** `connect` makes it from the plugin's manifest; the console seals its secrets from Slack's answer. `--language` sets the language of the names the app shows in Slack, the leave shortcut's among them; the workspace's first unless said.
38
+ 4. **The installation.** `connect` answers an address on slack.com. A person who may install apps in the workspace opens it in their browser while signed in to the console, and approves; Slack sends them back to the console, which keeps the bot's token. An agent cannot do this step for them: say the address and wait.
39
+ 5. **The people.** Within the hour the plugin matches everyone by email, and every day after; `match` does it now. `people --state no_email` lists those the console knows no address for, which an administrator writes on the console's People page.
40
+ 6. **HR.** For the leave shortcut and the threads, an administrator turns on `plugins:hr` among the plugin's optional capabilities and grants it HR's role `hr` on the plugin's settings page; `status` says what is missing.
41
+ 7. **The routes.** `channels` lists the channels; `route <channel>` sends approved leave there. A private channel takes posts only once someone invites the app to it in Slack.
42
+
43
+ To move to another workspace, as from a workspace kept for trying the plugin to the organization's own: `disconnect`, paste the other workspace's configuration tokens, then `connect` and install there. The routes and the matched accounts of the last workspace go when the new one is installed; in the same workspace they stay.
44
+
45
+ ## When a message did not go out
46
+
47
+ - `activity --outcome failed` says what Slack or the console answered, and `activity --outcome skipped` why an event was passed over: Slack not connected, HR's api off, the role not granted, nobody in Slack to tell.
48
+ - Someone gets nothing: `people` says whether they are matched; a person with no email in the console, or with another address in Slack, is not.
49
+ - The shortcut is missing in Slack: `status` says whether HR is on for the messenger; the plugin puts the shortcut in the app within the hour once it is.
50
+
51
+ ## Rules
52
+
53
+ - Never ask for a token in chat, never repeat one, never put one in a report: an administrator pastes it into the console, and the plugin never reads it.
54
+ - A route carries what everyone in a channel may read: who is out and when, never a reason. The reason stays in the thread of the person and whoever decides.
55
+ - People decide: the plugin answers a decision only for the person who pressed its button in Slack, as theirs, and only one on their plate. An agent answers a decision only as its person tells it, with `console answer`.
56
+ - `test` is the one message an agent sends; everything else the messenger sends follows from what happened on the console.