paperclip-plugin-slack-socket 0.1.0 → 0.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/README.md CHANGED
@@ -20,7 +20,15 @@ Paperclip installs plugins instance-wide from an npm package name or a local pat
20
20
  - **CLI** — `paperclipai plugin install <npm-package-or-absolute-path>`.
21
21
  - **REST API** — `POST /api/plugins/install` with a JSON body of `{"packageName": "...", "isLocalPath": true|false}`.
22
22
 
23
- This package is not yet published to npm, so today you install it from a local clone instead of by package name:
23
+ The package is published on npm as [`paperclip-plugin-slack-socket`](https://www.npmjs.com/package/paperclip-plugin-slack-socket), so the normal install is by name through any of the three routes:
24
+
25
+ ```sh
26
+ paperclipai plugin install paperclip-plugin-slack-socket
27
+ ```
28
+
29
+ or enter `paperclip-plugin-slack-socket` in **Settings → Plugins → Install**, or `POST /api/plugins/install` with `{"packageName": "paperclip-plugin-slack-socket"}`.
30
+
31
+ For development, you can install from a local clone instead:
24
32
 
25
33
  ```sh
26
34
  git clone https://github.com/0xCVH/paperclip-plugin-slack-socket
@@ -29,7 +37,7 @@ npm install
29
37
  npm run build
30
38
  ```
31
39
 
32
- Then install the **absolute path** to that clone via whichever route you prefer — UI (paste the absolute path where it asks for a package name), CLI (`paperclipai plugin install /absolute/path/to/paperclip-plugin-slack-socket`), or REST (`{"packageName": "/absolute/path/to/paperclip-plugin-slack-socket", "isLocalPath": true}`). Once this package is published to npm, `paperclip-plugin-slack-socket` will install by name through any of the three routes instead.
40
+ then install the **absolute path** to that clone — UI (paste the absolute path where it asks for a package name), CLI (`paperclipai plugin install /absolute/path/to/paperclip-plugin-slack-socket`), or REST (`{"packageName": "/absolute/path/to/paperclip-plugin-slack-socket", "isLocalPath": true}`).
33
41
 
34
42
  Per Paperclip's plugin spec, the host running Paperclip needs a writable filesystem, `npm` available on its `PATH`, and (for npm-name installs) network access to the npm registry.
35
43
 
@@ -47,8 +55,8 @@ That's it on the Slack side — the manifest already enables Socket Mode, declar
47
55
  1. In Paperclip, go to **Settings → Secrets** and create two secrets: one holding the Bot User OAuth Token (`xoxb-…`) and one holding the App-Level Token (`xapp-…`). Note the secret reference Paperclip shows for each (the settings form's secret-ref fields store whatever the Secrets page provides — the plugin passes it through opaquely and never sees the raw value).
48
56
  2. Install the plugin into your Paperclip instance (plugin id `cvh.slack-socket`) — see [Install the plugin](#install-the-plugin) above.
49
57
  3. Open the plugin's instance settings and fill in:
50
- - **Slack Bot Token (secret reference)** — the secret reference for the bot token secret from step 1.
51
- - **Slack App-Level Token (secret reference)** — the secret reference for the app token secret from step 1.
58
+ - **Slack Bot Token (secret reference)** — use the field's secret picker to select the bot token secret from step 1. The picker stores a secret reference, which is what the plugin resolves at runtime; typing a raw UUID into the field instead will fail to resolve.
59
+ - **Slack App-Level Token (secret reference)** — likewise, pick the app token secret from step 1.
52
60
  - **Company ID** — the Paperclip company UUID used for sessions, issues, and approvals.
53
61
  - **Default Agent ID** — the agent that handles DM and @mention conversations.
54
62
  - **Default Slack Channel ID** — the fallback channel for notifications (e.g. `C01ABC2DEF3`).
@@ -1,7 +1,7 @@
1
1
  import type { PluginToolDeclaration, ScopeKey } from "@paperclipai/plugin-sdk";
2
2
  import type { SlackSocketConfig } from "./types.js";
3
3
  export declare const PLUGIN_ID = "cvh.slack-socket";
4
- export declare const PLUGIN_VERSION = "0.1.0";
4
+ export declare const PLUGIN_VERSION = "0.1.1";
5
5
  export declare const ACTION_IDS: {
6
6
  readonly approvalApprove: "approval_approve";
7
7
  readonly approvalReject: "approval_reject";
package/dist/constants.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const PLUGIN_ID = "cvh.slack-socket";
2
- export const PLUGIN_VERSION = "0.1.0";
2
+ export const PLUGIN_VERSION = "0.1.1";
3
3
  export const ACTION_IDS = {
4
4
  approvalApprove: "approval_approve",
5
5
  approvalReject: "approval_reject",
package/dist/manifest.js CHANGED
@@ -32,17 +32,23 @@ const manifest = {
32
32
  type: "object",
33
33
  properties: {
34
34
  slackBotTokenRef: {
35
- type: "string",
35
+ // The host's secret picker stores a `{ type: "secret_ref", secretId,
36
+ // version }` object, and ctx.secrets.resolve() fails closed on plain
37
+ // UUID strings — so the object is the shape that actually works at
38
+ // runtime. The string branch keeps the form's raw-input path valid.
39
+ // The host validates the binding itself; constraining it further here
40
+ // would reject valid shapes (e.g. a numeric `version` selector).
41
+ type: ["string", "object"],
36
42
  format: "secret-ref",
37
43
  title: "Slack Bot Token (secret reference)",
38
- description: "Secret UUID holding your Slack Bot OAuth token (xoxb-…). Create the secret in Settings → Secrets, then paste its UUID here.",
44
+ description: "Secret holding your Slack Bot OAuth token (xoxb-…). Create the secret in Settings → Secrets, then select it with the secret picker here.",
39
45
  default: DEFAULT_CONFIG.slackBotTokenRef,
40
46
  },
41
47
  slackAppTokenRef: {
42
- type: "string",
48
+ type: ["string", "object"],
43
49
  format: "secret-ref",
44
50
  title: "Slack App-Level Token (secret reference)",
45
- description: "Secret UUID holding your Slack App-Level token (xapp-…) with the connections:write scope.",
51
+ description: "Secret holding your Slack App-Level token (xapp-…) with the connections:write scope. Select it with the secret picker.",
46
52
  default: DEFAULT_CONFIG.slackAppTokenRef,
47
53
  },
48
54
  companyId: {
@@ -108,7 +114,7 @@ const manifest = {
108
114
  default: DEFAULT_CONFIG.paperclipBaseUrl,
109
115
  },
110
116
  paperclipApiKeyRef: {
111
- type: "string",
117
+ type: ["string", "object"],
112
118
  format: "secret-ref",
113
119
  title: "Paperclip Board API Key (secret reference)",
114
120
  description: "Secret reference holding a Paperclip API key for a board-role user, sent as an Authorization: Bearer header on approval decision requests. Leave empty for local_trusted deployments, where every request is implicitly authenticated as board and no header is needed. Required for authenticated deployments so approval decisions (Approve/Reject button clicks) authenticate as a board user.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paperclip-plugin-slack-socket",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "Slack Socket Mode plugin for Paperclip: agent chat, notifications, approvals, ask-human tool. No public URL required.",
6
6
  "main": "./dist/index.js",
@@ -20,10 +20,15 @@
20
20
  "devDependencies": {
21
21
  "@paperclipai/plugin-sdk": "2026.722.0",
22
22
  "@types/node": "^25.5.2",
23
+ "ajv": "^8.20.0",
24
+ "ajv-formats": "^3.0.1",
23
25
  "typescript": "^5.7.0",
24
26
  "vitest": "^3.2.6"
25
27
  },
26
- "files": ["dist/", "slack-app-manifest.json"],
28
+ "files": [
29
+ "dist/",
30
+ "slack-app-manifest.json"
31
+ ],
27
32
  "paperclipPlugin": {
28
33
  "manifest": "./dist/manifest.js",
29
34
  "worker": "./dist/worker.js"