Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thirty-coins-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@plotday/sdk": patch
---

Changed: ActivityType.Task now has a default start of new Date()
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
Plot Agent SDK
</h1>
<p align="center">
The official SDK for building Plot agents -<br/>
intelligent assistants that organize and prioritize your activities from all your apps.
The official SDK for building [Plot](https://plot.day) agents -<br/>
custom code that organize and prioritize all your messages, tasks, and apps.
</p>

## Packages
Expand All @@ -19,10 +19,15 @@

## Quick Start

You'll need a [Plot account](https://plot.day) to deploy agents.

```bash
# Create a new agent
npx @plotday/sdk agent create

# Connect your Plot account
npx @plotday/sdk login

# Deploy your agent
cd my-agent
npm run deploy
Expand Down
1 change: 0 additions & 1 deletion sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ Activities are the core data type in Plot, representing tasks, events, and notes
await this.plot.createActivity({
type: ActivityType.Task,
title: "Review pull request",
start: new Date(),
links: [
{
type: ActivityLinkType.external,
Expand Down
29 changes: 0 additions & 29 deletions sdk/cli/templates/AGENTS.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ async activate(_priority: Pick<Priority, "id">) {
await this.plot.createActivity({
type: ActivityType.Task,
title: "Connect your account",
start: new Date(),
links: [authLink],
});
}
Expand All @@ -124,7 +123,6 @@ async activate(_priority: Pick<Priority, "id">) {
const activity = await this.plot.createActivity({
type: ActivityType.Task,
title: "Setup",
start: new Date(),
});

await this.set("setup_activity_id", activity.id);
Expand Down Expand Up @@ -200,7 +198,6 @@ async activate(_priority: Pick<Priority, "id">) {
const activity = await this.plot.createActivity({
type: ActivityType.Task,
title: "Connect Google account",
start: new Date(),
links: [authLink],
});

Expand Down Expand Up @@ -383,32 +380,6 @@ try {
- **Clean up callbacks and stored state** - Delete callbacks and Store entries when no longer needed.
- **Handle missing auth gracefully** - Check for stored auth before operations.

## Type Patterns

### Entity Types

Follow Plot's entity type patterns:

```typescript
export type Activity = {
id: string; // Required
type: ActivityType; // Required
title: string | null; // Nullable (not optional)
note: string | null; // Nullable (not optional)
start: Date | string | null; // Nullable (not optional)
};

export type NewActivity = {
type: Activity["type"]; // Only type is required
} & Partial<Omit<Activity, "id" | "author" | "type">>;
```

This pattern distinguishes between:

- Omitted fields (`undefined` in Partial types)
- Explicitly set to null (clearing a value)
- Set to a value

## Testing

Before deploying, verify:
Expand Down
1 change: 0 additions & 1 deletion sdk/src/common/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export interface SyncOptions {
* type: ActivityType.Task,
* title: "Connect Google Calendar",
* links: [authLink],
* start: new Date(),
* });
* }
*
Expand Down
2 changes: 0 additions & 2 deletions sdk/src/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export type ActivitySource = {
* type: ActivityType.Task,
* title: "Review budget proposal",
* author: { id: "user-1", name: "John Doe", type: AuthorType.User },
* start: new Date(),
* end: null,
* priority: { id: "work", title: "Work" },
* // ... other fields
Expand Down Expand Up @@ -300,7 +299,6 @@ export type Activity = {
* const newTask: NewActivity = {
* type: ActivityType.Task,
* title: "Review pull request",
* start: new Date(),
* links: [{
* title: "View PR",
* type: ActivityLinkType.external,
Expand Down