You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changed: BREAKING: Renamed Source to Connector across the SDK. The `Source` class is now `Connector`, the `./source` export is now `./connector`, and all `@plotday/source-*` packages are now `@plotday/connector-*`. A deprecated `Source` alias is re-exported for backward compatibility.
Copy file name to clipboardExpand all lines: AGENTS.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ This guide helps AI assistants build Plot sources and twists correctly.
4
4
5
5
## What Are You Building?
6
6
7
-
### Building a Source (service integration)
7
+
### Building a Connector (service integration)
8
8
9
-
Sources are packages that connect to external services (Linear, Slack, Google Calendar, etc.). They extend Source and save data directly via `integrations.saveThread()`.
9
+
Connectors are packages that connect to external services (Linear, Slack, Google Calendar, etc.). They extend Connector and save data directly via `integrations.saveThread()`.
10
10
11
-
**Start here:**`sources/AGENTS.md` — Complete source development guide with scaffold, patterns, and checklist.
11
+
**Start here:**`connectors/AGENTS.md` — Complete connector development guide with scaffold, patterns, and checklist.
12
12
13
13
### Building a Twist (orchestrator)
14
14
@@ -20,7 +20,7 @@ Twists are the entry point that users install. They declare which tools to use a
20
20
21
21
All types in `twister/src/` with full JSDoc:
22
22
23
-
-**Source base**: `twister/src/source.ts`
23
+
-**Connector base**: `twister/src/connector.ts`
24
24
-**Tool base**: `twister/src/tool.ts`
25
25
-**Twist base**: `twister/src/twist.ts`
26
26
-**Built-in tools**: `twister/src/tools/*.ts`
@@ -30,23 +30,23 @@ All types in `twister/src/` with full JSDoc:
1.**❌ Using instance variables for state** — Use `this.set()`/`this.get()` (state doesn't persist between executions)
43
43
2.**❌ Long-running operations without batching** — Break into chunks with `runTask()` (~1000 requests per execution)
44
-
3.**❌ Passing functions to `this.callback()`** — See `sources/AGENTS.md` for callback serialization pattern
44
+
3.**❌ Passing functions to `this.callback()`** — See `connectors/AGENTS.md` for callback serialization pattern
45
45
4.**❌ Forgetting sync metadata** — Always inject `syncProvider` and `channelId` into `thread.meta`
46
46
5.**❌ Not handling initial vs incremental sync** — Propagate `initialSync` flag from entry point (`onChannelEnabled` → `true`, webhook → `false`) through all batch callbacks. Set `unread: false` and `archived: false` for initial, omit for incremental
47
47
6.**❌ Missing localhost guard in webhooks** — Skip webhook registration when URL contains "localhost"
48
48
7.**❌ Stripping HTML tags locally** — Pass raw HTML with `contentType: "html"` for server-side markdown conversion
49
49
50
50
---
51
51
52
-
**Remember**: When in doubt, check the type definitions in `twister/src/` and study the working examples in `sources/`.
52
+
**Remember**: When in doubt, check the type definitions in `twister/src/` and study the working examples in `connectors/`.
0 commit comments