@framers/agentos-ext-channel-twitch 0.1.4 → 0.1.6

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 ADDED
@@ -0,0 +1,74 @@
1
+ # Twitch channel
2
+
3
+ This pack gives an agent inbound and outbound Twitch IRC chat messaging through `tmi.js`.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @framers/agentos-ext-channel-twitch
9
+ ```
10
+
11
+ Peer dependency: `@framers/agentos` `>=0.10.40`.
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import { AgentOS } from '@framers/agentos';
17
+
18
+ const agentos = await AgentOS.create({
19
+ extensionManifest: {
20
+ packs: [
21
+ {
22
+ package: '@framers/agentos-ext-channel-twitch',
23
+ options: {
24
+ oauthToken: process.env.TWITCH_OAUTH_TOKEN,
25
+ username: process.env.TWITCH_USERNAME,
26
+ channel: process.env.TWITCH_CHANNEL,
27
+ },
28
+ },
29
+ ],
30
+ },
31
+ });
32
+ ```
33
+
34
+ ## Configuration
35
+
36
+ | Option | Secret id | Environment variable | Required | Default |
37
+ | --- | --- | --- | --- | --- |
38
+ | `oauthToken` | `twitch.oauthToken` | `TWITCH_OAUTH_TOKEN` | Yes | None |
39
+ | `username` | `twitch.username` | `TWITCH_USERNAME`, then `TWITCH_CHANNEL` through channel fallback | Yes, by manifest | Channel name without `#` |
40
+ | `channel` | `twitch.channel` | `TWITCH_CHANNEL` | Yes | None |
41
+ | `ignoreSelfMessages` | None | None | No | `true` |
42
+ | `priority` | None | None | No | `50` |
43
+ | `secrets` | `twitch.oauthToken`, `twitch.username`, `twitch.channel` | None | No | None |
44
+
45
+ Credentials resolve from options, then `options.secrets`, then environment variables. If no username resolves, the code uses the channel from options, secrets or `TWITCH_CHANNEL`, in that order. The manifest declares `twitch.username` required.
46
+
47
+ ## Tools
48
+
49
+ | Tool | What it does |
50
+ | --- | --- |
51
+ | `twitchChannelSendMessage` | Send a chat message to a Twitch channel name. |
52
+
53
+ ### `twitchChannelSendMessage`
54
+
55
+ | Parameter | Type | Required | Description |
56
+ | --- | --- | --- | --- |
57
+ | `conversationId` | string | Yes | Target channel name (without `#`) |
58
+ | `text` | string | Yes | Message text |
59
+
60
+ ## Channel adapter
61
+
62
+ The adapter registers platform `twitch`. Activation connects a `tmi.js` client with a secure connection, automatic reconnection, the configured identity and channel. Incoming IRC messages become channel text events with sender information from IRC tags. Self messages are ignored unless `ignoreSelfMessages` is `false`.
63
+
64
+ Sending uses the first text block and calls `say` for the target channel. The service uses the configured channel if the target is empty. Channel names accept a leading `#`. Typing indicators do nothing.
65
+
66
+ ## Notes
67
+
68
+ Creating the pack throws if the OAuth token or channel is missing. Activation rejects an empty normalized token or channel. Tokens accept an `oauth:` prefix, a `Bearer ` prefix or a bare token; the service normalizes them to IRC authentication format.
69
+
70
+ Sending posts chat text. Returned outbound message IDs are generated locally rather than supplied by Twitch. Shutdown removes client listeners and disconnects the IRC client.
71
+
72
+ ## License
73
+
74
+ Apache-2.0
package/manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
3
3
  "id": "com.framers.channels.twitch",
4
4
  "name": "Twitch Channel Extension",
5
- "version": "0.1.4",
5
+ "version": "0.1.6",
6
6
  "description": "Twitch IRC chat via tmi.js — supports inbound/outbound chat messaging.",
7
7
  "categories": ["channel", "communication"],
8
8
  "platforms": ["twitch"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framers/agentos-ext-channel-twitch",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Twitch IRC chat channel adapter for AgentOS (tmi.js)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^20.0.0",
28
- "typescript": "^5.0.0",
28
+ "typescript": "^6.0.3",
29
29
  "vitest": "^3.2.7",
30
- "@framers/agentos": "^0.13.40"
30
+ "@framers/agentos": "^0.15.67"
31
31
  },
32
32
  "engines": {
33
33
  "node": ">=22"
@@ -45,6 +45,7 @@
45
45
  "bugs": {
46
46
  "url": "https://github.com/framerslab/agentos-extensions/issues"
47
47
  },
48
+ "gitHead": "6397d0f3417f6a74ad2fdcd666fd0634e832fb40",
48
49
  "scripts": {
49
50
  "build": "tsc",
50
51
  "dev": "tsc --watch",