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
8 changes: 8 additions & 0 deletions .changeset/wise-queens-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@plotday/tool-outlook-calendar": patch
"@plotday/tool-google-calendar": patch
"@plotday/tool-google-contacts": patch
"@plotday/sdk": patch
---

Fixed: Several instances of Agents and Tools missing the id argument
2 changes: 1 addition & 1 deletion sdk/cli/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export async function createCommand(options: CreateOptions) {
} from "@plotday/sdk";

export default class extends Agent {
constructor(tools: Tools) {
constructor(id: string, tools: Tools) {
super();
}

Expand Down
4 changes: 2 additions & 2 deletions sdk/cli/templates/README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Agents access functionality through tools. Get tools in the constructor:

```typescript
constructor(protected tools: Tools) {
super(tools);
super(id, tools);
this.plot = tools.get(Plot);
// Store, Run, and Callback methods are available directly via this
}
Expand Down Expand Up @@ -84,7 +84,7 @@ Then use them in your agent:
```typescript
import { GoogleCalendar } from "@plotday/sdk/tools/google-calendar";

constructor(tools: Tools) {
constructor(id: string, tools: Tools) {
super();
this.googleCalendar = tools.get(GoogleCalendar);
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/tools/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type Log = {
* class AgentBuilderAgent extends Agent {
* private agent: AgentManager;
*
* constructor(tools: Tools) {
* constructor(id: string, tools: Tools) {
* super();
* this.agent = tools.get(AgentTool);
* }
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/tools/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { ITool } from "..";
* class SmartEmailTool extends Tool {
* private ai: AI;
*
* constructor(tools: Tools) {
* constructor(id: string, tools: Tools) {
* super();
* this.ai = tools.get(AI);
* }
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/tools/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { type ActivityLink, type Callback, ITool, type Tools } from "..";
* class CalendarTool extends Tool {
* private auth: Auth;
*
* constructor(tools: Tools) {
* constructor(id: string, tools: Tools) {
* super();
* this.auth = tools.get(Auth);
* }
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/tools/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
* class MyAgent extends Agent {
* private plot: Plot;
*
* constructor(tools: Tools) {
* constructor(id: string, tools: Tools) {
* super();
* this.plot = tools.get(Plot);
* }
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/tools/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ITool, type Tools } from "..";
* class CalendarTool extends Tool {
* private webhook: Webhook;
*
* constructor(tools: Tools) {
* constructor(id: string, tools: Tools) {
* super();
* this.webhook = tools.get(Webhook);
* }
Expand Down
2 changes: 1 addition & 1 deletion tools/google-calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class extends Agent {
private googleCalendar: GoogleCalendar;
private auth: Auth;

constructor(tools: Tools) {
constructor(id: string, tools: Tools) {
super();
this.googleCalendar = tools.get(GoogleCalendar);
this.auth = tools.get(Auth);
Expand Down
2 changes: 1 addition & 1 deletion tools/google-calendar/src/google-calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type AuthSuccessContext = {
* class EventsAgent extends Agent {
* private googleCalendar: GoogleCalendar;
*
* constructor(tools: Tools) {
* constructor(id: string, tools: Tools) {
* super();
* this.googleCalendar = tools.get(GoogleCalendar);
* }
Expand Down
2 changes: 1 addition & 1 deletion tools/google-contacts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class extends Agent {
private googleContacts: GoogleContacts;
private auth: Auth;

constructor(tools: Tools) {
constructor(id: string, tools: Tools) {
super();
this.googleContacts = tools.get(GoogleContacts);
this.auth = tools.get(Auth);
Expand Down
2 changes: 1 addition & 1 deletion tools/outlook-calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class extends Agent {
private outlookCalendar: OutlookCalendar;
private auth: Auth;

constructor(tools: Tools) {
constructor(id: string, tools: Tools) {
super();
this.outlookCalendar = tools.get(OutlookCalendar);
this.auth = tools.get(Auth);
Expand Down
2 changes: 1 addition & 1 deletion tools/outlook-calendar/src/outlook-calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const outlookApi = {
* class EventsAgent extends Agent {
* private outlookCalendar: OutlookCalendar;
*
* constructor(tools: Tools) {
* constructor(id: string, tools: Tools) {
* super();
* this.outlookCalendar = tools.get(OutlookCalendar);
* }
Expand Down