@ever-works/bluesky-connector-plugin 1.0.0
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 +51 -0
- package/dist/index.cjs +41293 -0
- package/dist/index.d.cts +166 -0
- package/dist/index.d.ts +166 -0
- package/dist/index.js +41276 -0
- package/package.json +108 -0
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @ever-works/bluesky-connector-plugin
|
|
2
|
+
|
|
3
|
+
First-party **Bluesky (AT Protocol) social connector** for the Ever Works
|
|
4
|
+
platform, built on the official
|
|
5
|
+
[`@atproto/api`](https://www.npmjs.com/package/@atproto/api) SDK.
|
|
6
|
+
|
|
7
|
+
Capabilities: `connector`, `connector-bluesky`, `event-source`.
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
- **Outbound** — `send()` publishes a post, or a threaded reply when the target
|
|
12
|
+
config carries `replyToUri` + `replyToCid` (an explicit `rootUri`/`rootCid`
|
|
13
|
+
overrides the thread root, otherwise the parent is used). Idempotent on
|
|
14
|
+
`messageRef`.
|
|
15
|
+
- **Event source** — `pullEvents()` sweeps notifications (mentions, replies,
|
|
16
|
+
likes, reposts, follows) and then the connected account's own posts,
|
|
17
|
+
normalized into `IngestedEventEnvelope`s (`bluesky.notification` /
|
|
18
|
+
`bluesky.post`) for the event-ingest spine. Each envelope carries the public
|
|
19
|
+
`bsky.app` permalink as `sourceUrl` so Memory/Activity rows link back to the
|
|
20
|
+
origin. Neither AT Protocol endpoint filters by time, so each phase is
|
|
21
|
+
windowed client-side newest-first and stops at the first item older than the
|
|
22
|
+
watermark.
|
|
23
|
+
- **Opt-in historical backfill** — `backfillDays` (default `0` = off, max 90)
|
|
24
|
+
widens the FIRST pull's window only, bounded to
|
|
25
|
+
`BLUESKY_BACKFILL_MAX_PAGES` pages per phase.
|
|
26
|
+
|
|
27
|
+
## Degradation is loud, never silent
|
|
28
|
+
|
|
29
|
+
- `verifyConnection()` reports missing credentials, an SSRF-unsafe PDS URL, and
|
|
30
|
+
login failures.
|
|
31
|
+
- `send()` throws on missing credentials or a failed post.
|
|
32
|
+
- `pullEvents()` throws `EventSourceNotConfiguredError` when the identifier or
|
|
33
|
+
app password is absent.
|
|
34
|
+
|
|
35
|
+
## Settings
|
|
36
|
+
|
|
37
|
+
| Key | Notes |
|
|
38
|
+
| -------------- | ---------------------------------------------------------- |
|
|
39
|
+
| `identifier` | Handle or DID of the connected account. |
|
|
40
|
+
| `appPassword` | App password — secret, env `BLUESKY_APP_PASSWORD`. |
|
|
41
|
+
| `service` | PDS URL (defaults to `https://bsky.social`), SSRF-guarded. |
|
|
42
|
+
| `backfillDays` | Opt-in first-pull history window (0 = off, max 90). |
|
|
43
|
+
|
|
44
|
+
Always authenticate with a Bluesky **app password**, never the account
|
|
45
|
+
password. No credential is hardcoded, logged, or written into an ingested
|
|
46
|
+
envelope.
|
|
47
|
+
|
|
48
|
+
## Testing
|
|
49
|
+
|
|
50
|
+
Hermetic Vitest suite (`pnpm test`) — the SDK agent is stubbed through the
|
|
51
|
+
`createAgent` seam; no network calls.
|