@ycodium-ai/plugin-webhook-notify 0.2.0 → 0.2.1908
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 +60 -0
- package/dist/index.js +2 -5
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# @ycodium-ai/plugin-webhook-notify
|
|
2
|
+
|
|
3
|
+
Send a JSON notification to your webhook when a Ycodium conversation finishes or fails.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
The plugin ships enabled with Ycodium. It stays idle until you configure a URL.
|
|
8
|
+
To install it separately or restore a removed installation:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
ycodium plugin add @ycodium-ai/plugin-webhook-notify
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
In **Settings → Plugins → Webhook notifications**, set **Webhook URL** and save.
|
|
15
|
+
Requests run on the connected machine and use its proxy settings. The URL must be reachable
|
|
16
|
+
from that machine.
|
|
17
|
+
|
|
18
|
+
## Notifications
|
|
19
|
+
|
|
20
|
+
The plugin sends an HTTP POST with `Content-Type: application/json`:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"event": "thread.settled",
|
|
25
|
+
"threadId": "conversation-id",
|
|
26
|
+
"summary": "The conversation has finished",
|
|
27
|
+
"occurredAt": "2026-09-14T00:00:00.000Z",
|
|
28
|
+
"eventId": "event-id"
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`event` is `thread.settled` or `thread.failed`. Use `eventId` to recognize the same event
|
|
33
|
+
if your receiver handles duplicate deliveries.
|
|
34
|
+
|
|
35
|
+
Requests time out after 10 seconds. Network errors and non-success responses are logged;
|
|
36
|
+
they do not interrupt the conversation. The plugin does not retry failed requests.
|
|
37
|
+
|
|
38
|
+
## Disable, update, or remove
|
|
39
|
+
|
|
40
|
+
Clear **Webhook URL** to stop sending notifications while keeping the plugin enabled.
|
|
41
|
+
The plugin's enable switch stops its subscriptions and aborts pending requests.
|
|
42
|
+
Remove it from Settings → Plugins to uninstall it.
|
|
43
|
+
|
|
44
|
+
Install a specific newer version with:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
ycodium plugin add @ycodium-ai/plugin-webhook-notify@<version>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The plugin declares no additional permissions. It uses the HTTP and event capabilities
|
|
51
|
+
provided by the host, and requires plugin API version 2.
|
|
52
|
+
|
|
53
|
+
## Development
|
|
54
|
+
|
|
55
|
+
The package builds its own code into `dist/index.js`. The host supplies the shared
|
|
56
|
+
`@ycodium-ai/plugin-api` at runtime.
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
UNLICENSED.
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
// ../../packages/plugin-api/src/index.ts
|
|
2
|
-
var PLUGIN_API_VERSION = 2;
|
|
3
|
-
var definePlugin = (definition) => definition;
|
|
4
|
-
|
|
5
1
|
// src/index.ts
|
|
2
|
+
import { definePlugin } from "@ycodium-ai/plugin-api";
|
|
6
3
|
var REQUEST_TIMEOUT_MS = 1e4;
|
|
7
4
|
var readUrl = (config) => {
|
|
8
5
|
const value = config["url"];
|
|
@@ -18,7 +15,7 @@ var webhookPayload = (event) => ({
|
|
|
18
15
|
});
|
|
19
16
|
var webhookNotifyPlugin = definePlugin({
|
|
20
17
|
id: "webhook-notify",
|
|
21
|
-
apiVersion:
|
|
18
|
+
apiVersion: 2,
|
|
22
19
|
activate: (ctx) => {
|
|
23
20
|
const disposeController = new AbortController();
|
|
24
21
|
const notify = async (event) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/plugin-webhook-notify",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1908",
|
|
4
4
|
"description": "Posts to a URL you choose whenever a thread finishes or fails.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webhook",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@effect/vitest": "4.0.0-beta.103",
|
|
20
20
|
"esbuild": "0.28.1",
|
|
21
21
|
"vite-plus": "0.2.2",
|
|
22
|
-
"@ycodium-ai/plugin-api": "0.
|
|
22
|
+
"@ycodium-ai/plugin-api": "0.2.1908"
|
|
23
23
|
},
|
|
24
24
|
"ycodium": {
|
|
25
25
|
"plugin": "./dist/index.js",
|