@framers/agentos-ext-channel-farcaster 0.1.2 → 0.1.3

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.
Files changed (3) hide show
  1. package/README.md +113 -0
  2. package/manifest.json +1 -1
  3. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # Farcaster channel
2
+
3
+ This pack gives an agent tools to publish casts, reply, like, recast, search and read feeds on Farcaster using the Neynar API through `axios`.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @framers/agentos-ext-channel-farcaster
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-farcaster',
23
+ options: {
24
+ signerUuid: process.env.FARCASTER_SIGNER_UUID,
25
+ neynarApiKey: process.env.NEYNAR_API_KEY,
26
+ fid: process.env.FARCASTER_FID
27
+ ? parseInt(process.env.FARCASTER_FID)
28
+ : undefined,
29
+ },
30
+ },
31
+ ],
32
+ },
33
+ });
34
+ ```
35
+
36
+ ## Configuration
37
+
38
+ Options take precedence over secrets, then environment variables. `options.secrets` takes precedence over `context.secrets`. Secret and environment values for `fid` are parsed as decimal integers.
39
+
40
+ | Option | Secret id | Environment variable | Required | Default |
41
+ | --- | --- | --- | --- | --- |
42
+ | `signerUuid` | `farcaster.signerUuid` | `FARCASTER_SIGNER_UUID` | Yes | `''` |
43
+ | `neynarApiKey` | `farcaster.neynarApiKey` | `NEYNAR_API_KEY` | Yes | `''` |
44
+ | `fid` | `farcaster.fid` | `FARCASTER_FID` | No | Unset |
45
+ | `secrets` | None | None | No | `context.secrets`, then `{}` |
46
+
47
+ ## Tools
48
+
49
+ | Tool | What it does |
50
+ | --- | --- |
51
+ | `farcasterCast` | Publishes a cast with optional embeds and channel targeting. |
52
+ | `farcasterFeed` | Retrieves following or trending casts. |
53
+ | `farcasterLike` | Likes a Farcaster cast. |
54
+ | `farcasterRecast` | Shares a Farcaster cast. |
55
+ | `farcasterReply` | Replies to a Farcaster cast. |
56
+ | `farcasterSearch` | Searches casts matching a query. |
57
+
58
+ ### `farcasterCast`
59
+
60
+ | Parameter | Type | Required | Description |
61
+ | --- | --- | --- | --- |
62
+ | `text` | string | Yes | Cast text content |
63
+ | `embeds` | array of string | No | URLs to embed in the cast |
64
+ | `channelId` | string | No | Farcaster channel ID to post in (e.g. "ethereum") |
65
+
66
+ ### `farcasterFeed`
67
+
68
+ | Parameter | Type | Required | Description |
69
+ | --- | --- | --- | --- |
70
+ | `type` | string: `following`, `trending` | No | Feed type (default "following") |
71
+ | `limit` | number | No | Max casts to return (default 20) |
72
+
73
+ ### `farcasterLike`
74
+
75
+ | Parameter | Type | Required | Description |
76
+ | --- | --- | --- | --- |
77
+ | `castHash` | string | Yes | Hash of the cast to like |
78
+
79
+ ### `farcasterRecast`
80
+
81
+ | Parameter | Type | Required | Description |
82
+ | --- | --- | --- | --- |
83
+ | `castHash` | string | Yes | Hash of the cast to recast |
84
+
85
+ ### `farcasterReply`
86
+
87
+ | Parameter | Type | Required | Description |
88
+ | --- | --- | --- | --- |
89
+ | `parentHash` | string | Yes | Hash of the cast to reply to |
90
+ | `text` | string | Yes | Reply text |
91
+
92
+ ### `farcasterSearch`
93
+
94
+ | Parameter | Type | Required | Description |
95
+ | --- | --- | --- | --- |
96
+ | `query` | string | Yes | Search query |
97
+ | `limit` | number | No | Max results to return (default 10) |
98
+
99
+ ## Channel adapter
100
+
101
+ The adapter registers platform `farcaster` and initializes the Neynar HTTP client. Sending publishes the first text block, embeds URLs from image and link blocks, passes `replyToMessageId` as the parent cast hash and reads `platformOptions.channelId` for channel targeting. Reactions create likes. The adapter stores event handlers but does not fetch or dispatch inbound events. Typing indicators do nothing.
102
+
103
+ ## Notes
104
+
105
+ Publishing, replying, liking and recasting create remote content or reactions. The exported service also exposes `deleteCast`, which deletes a cast using the signer UUID and target hash.
106
+
107
+ Activation tries `FileTokenStore` from `@framers/agentos/auth` when the Neynar API key is missing. It reads the API key from the stored access token and missing signer UUID and FID from metadata. Initialization throws if the API key or signer UUID is missing.
108
+
109
+ The configured `fid` is used for user lookup and as a fallback author FID in publish results. Feed requests do not pass it to Neynar.
110
+
111
+ ## License
112
+
113
+ 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.farcaster",
4
4
  "name": "Farcaster Channel Extension",
5
- "version": "0.1.2",
5
+ "version": "0.1.3",
6
6
  "description": "Bidirectional Farcaster integration — publish casts, reply, like, recast, search, and browse feeds via Neynar API.",
7
7
  "categories": ["channel", "social"],
8
8
  "platforms": ["farcaster"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framers/agentos-ext-channel-farcaster",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Farcaster channel adapter for AgentOS — publish casts, reply, like, recast, search, and browse feeds via Neynar API.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "@types/node": "^20.0.0",
20
20
  "typescript": "^5.0.0",
21
21
  "vitest": "^3.2.7",
22
- "@framers/agentos": "^0.13.40"
22
+ "@framers/agentos": "^0.13.47"
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",