paperclip-plugin-mattermost 0.11.0 → 0.11.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/README.md +10 -0
- package/dist/manifest.js +1 -1
- package/dist/ui/index.js +35 -1
- package/dist/worker.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,6 +74,16 @@ PAPERCLIP_REF=<commit> node build.mjs # build for another Paperclip version
|
|
|
74
74
|
- `scripts/deploy-remote.sh` copies a build to a Paperclip running in Docker on another machine over ssh, and reloads it with Paperclip's CLI.
|
|
75
75
|
- `test/live-mattermost.ts` and `test/live-roster.ts` run against a real Mattermost.
|
|
76
76
|
|
|
77
|
+
## Releasing
|
|
78
|
+
|
|
79
|
+
Bump `version` in `package.json` and `src/manifest.ts`, commit, then tag and push:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
git tag v0.12.0 && git push origin main v0.12.0
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
GitHub Actions builds, tests and publishes to npm through npm trusted publishing, so no npm token is involved.
|
|
86
|
+
|
|
77
87
|
## License
|
|
78
88
|
|
|
79
89
|
MIT
|
package/dist/manifest.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var manifest = {
|
|
3
3
|
id: "mattermost-bridge",
|
|
4
4
|
apiVersion: 1,
|
|
5
|
-
version: "0.11.
|
|
5
|
+
version: "0.11.1",
|
|
6
6
|
displayName: "Mattermost",
|
|
7
7
|
description: "Every agent becomes its own Mattermost bot. DM an agent or mention it in a channel and it answers in the thread, showing its steps as it works; follow-ups continue the conversation. Paperclip approvals arrive with Approve / Reject buttons.",
|
|
8
8
|
author: "Haseeb Azhar",
|
package/dist/ui/index.js
CHANGED
|
@@ -122,6 +122,37 @@ function AccessList({ members, agents, grants, accounts, onChange }) {
|
|
|
122
122
|
] })
|
|
123
123
|
] });
|
|
124
124
|
}
|
|
125
|
+
function TokenHelp({ mattermostUrl }) {
|
|
126
|
+
const base = /^https?:\/\/\S+/.test(mattermostUrl.trim()) ? mattermostUrl.trim().replace(/\/+$/, "") : null;
|
|
127
|
+
const page = (path, label) => base ? /* @__PURE__ */ jsx("a", { href: `${base}${path}`, target: "_blank", rel: "noreferrer", children: label }) : /* @__PURE__ */ jsx("b", { children: label });
|
|
128
|
+
return /* @__PURE__ */ jsxs("details", { style: { marginTop: 8 }, children: [
|
|
129
|
+
/* @__PURE__ */ jsx("summary", { style: { cursor: "pointer", opacity: 0.9 }, children: "Don't see Personal Access Tokens?" }),
|
|
130
|
+
/* @__PURE__ */ jsxs("ol", { style: { margin: "8px 0 0", paddingLeft: 20, lineHeight: 1.6 }, children: [
|
|
131
|
+
/* @__PURE__ */ jsx("li", { children: "Sign in to Mattermost as a System Admin." }),
|
|
132
|
+
/* @__PURE__ */ jsxs("li", { children: [
|
|
133
|
+
"System Console \u2192 Integrations \u2192 ",
|
|
134
|
+
page("/admin_console/integrations/integration_management", "Integration Management"),
|
|
135
|
+
": set ",
|
|
136
|
+
/* @__PURE__ */ jsx("b", { children: "Enable Personal Access Tokens" }),
|
|
137
|
+
" to true and save."
|
|
138
|
+
] }),
|
|
139
|
+
/* @__PURE__ */ jsxs("li", { children: [
|
|
140
|
+
"System Console \u2192 Integrations \u2192 ",
|
|
141
|
+
page("/admin_console/integrations/bot_accounts", "Bot Accounts"),
|
|
142
|
+
": make sure ",
|
|
143
|
+
/* @__PURE__ */ jsx("b", { children: "Enable Bot Account Creation" }),
|
|
144
|
+
" is true."
|
|
145
|
+
] }),
|
|
146
|
+
/* @__PURE__ */ jsxs("li", { children: [
|
|
147
|
+
"Back in Mattermost: Profile \u2192 Security \u2192 ",
|
|
148
|
+
/* @__PURE__ */ jsx("b", { children: "Personal Access Tokens" }),
|
|
149
|
+
" \u2192 Create Token, and copy it."
|
|
150
|
+
] }),
|
|
151
|
+
/* @__PURE__ */ jsx("li", { children: "In Paperclip: Settings \u2192 Secrets \u2192 add a secret with that token, then choose it above." })
|
|
152
|
+
] }),
|
|
153
|
+
/* @__PURE__ */ jsx("div", { style: { marginTop: 6 }, children: "Still missing after step 2? The account you are signed in with is not a System Admin." })
|
|
154
|
+
] });
|
|
155
|
+
}
|
|
125
156
|
function validate(c) {
|
|
126
157
|
const errors = {};
|
|
127
158
|
const url = String(c.mattermostUrl ?? "").trim();
|
|
@@ -268,7 +299,10 @@ function SettingsPage({ context }) {
|
|
|
268
299
|
] }) : null
|
|
269
300
|
] }),
|
|
270
301
|
/* @__PURE__ */ jsx(Field, { label: "Mattermost URL", error: fieldErrors.mattermostUrl, help: "Your Mattermost address, for example https://chat.example.com", children: /* @__PURE__ */ jsx("input", { style: s.input, value: String(config.mattermostUrl ?? ""), onChange: (e) => set({ mattermostUrl: e.target.value }), placeholder: "https://chat.example.com" }) }),
|
|
271
|
-
/* @__PURE__ */ jsx(Field, { label: "Mattermost admin token", error: fieldErrors.botToken, help:
|
|
302
|
+
/* @__PURE__ */ jsx(Field, { label: "Mattermost admin token", error: fieldErrors.botToken, help: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
303
|
+
"A Paperclip secret holding a personal access token of a Mattermost System Admin (Profile \u2192 Security \u2192 Personal Access Tokens). It creates one bot per agent and keeps them in sync.",
|
|
304
|
+
/* @__PURE__ */ jsx(TokenHelp, { mattermostUrl: String(config.mattermostUrl ?? "") })
|
|
305
|
+
] }), children: /* @__PURE__ */ jsxs("select", { style: s.input, value: token?.secretId ?? "", onChange: (e) => set({ botToken: e.target.value ? { type: "secret_ref", version: "latest", secretId: e.target.value } : void 0 }), children: [
|
|
272
306
|
/* @__PURE__ */ jsx("option", { value: "", children: "Choose a secret\u2026" }),
|
|
273
307
|
secrets.map((x) => /* @__PURE__ */ jsx("option", { value: x.id, children: x.name || x.key || x.id }, x.id))
|
|
274
308
|
] }) }),
|
package/dist/worker.js
CHANGED
|
@@ -45683,7 +45683,7 @@ var AgentBots = class {
|
|
|
45683
45683
|
var manifest = {
|
|
45684
45684
|
id: "mattermost-bridge",
|
|
45685
45685
|
apiVersion: 1,
|
|
45686
|
-
version: "0.11.
|
|
45686
|
+
version: "0.11.1",
|
|
45687
45687
|
displayName: "Mattermost",
|
|
45688
45688
|
description: "Every agent becomes its own Mattermost bot. DM an agent or mention it in a channel and it answers in the thread, showing its steps as it works; follow-ups continue the conversation. Paperclip approvals arrive with Approve / Reject buttons.",
|
|
45689
45689
|
author: "Haseeb Azhar",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paperclip-plugin-mattermost",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Paperclip agents in Mattermost: a bot per agent, live progress, files, approval and decision buttons, and per-person access, for each Paperclip company.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|