Skip to content

Commit 2d53d37

Browse files
committed
Fix several instances of Agents and Tools missing the id argument
1 parent b77fe24 commit 2d53d37

File tree

13 files changed

+21
-13
lines changed

13 files changed

+21
-13
lines changed

.changeset/wise-queens-flash.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@plotday/tool-outlook-calendar": patch
3+
"@plotday/tool-google-calendar": patch
4+
"@plotday/tool-google-contacts": patch
5+
"@plotday/sdk": patch
6+
---
7+
8+
Fixed: Several instances of Agents and Tools missing the id argument

sdk/cli/commands/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export async function createCommand(options: CreateOptions) {
153153
} from "@plotday/sdk";
154154
155155
export default class extends Agent {
156-
constructor(tools: Tools) {
156+
constructor(id: string, tools: Tools) {
157157
super();
158158
}
159159

sdk/cli/templates/README.template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Agents access functionality through tools. Get tools in the constructor:
5252

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

87-
constructor(tools: Tools) {
87+
constructor(id: string, tools: Tools) {
8888
super();
8989
this.googleCalendar = tools.get(GoogleCalendar);
9090
}

sdk/src/tools/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export type Log = {
3939
* class AgentBuilderAgent extends Agent {
4040
* private agent: AgentManager;
4141
*
42-
* constructor(tools: Tools) {
42+
* constructor(id: string, tools: Tools) {
4343
* super();
4444
* this.agent = tools.get(AgentTool);
4545
* }

sdk/src/tools/ai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { ITool } from "..";
2424
* class SmartEmailTool extends Tool {
2525
* private ai: AI;
2626
*
27-
* constructor(tools: Tools) {
27+
* constructor(id: string, tools: Tools) {
2828
* super();
2929
* this.ai = tools.get(AI);
3030
* }

sdk/src/tools/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { type ActivityLink, type Callback, ITool, type Tools } from "..";
1212
* class CalendarTool extends Tool {
1313
* private auth: Auth;
1414
*
15-
* constructor(tools: Tools) {
15+
* constructor(id: string, tools: Tools) {
1616
* super();
1717
* this.auth = tools.get(Auth);
1818
* }

sdk/src/tools/plot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
* class MyAgent extends Agent {
2323
* private plot: Plot;
2424
*
25-
* constructor(tools: Tools) {
25+
* constructor(id: string, tools: Tools) {
2626
* super();
2727
* this.plot = tools.get(Plot);
2828
* }

sdk/src/tools/webhook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { ITool, type Tools } from "..";
1818
* class CalendarTool extends Tool {
1919
* private webhook: Webhook;
2020
*
21-
* constructor(tools: Tools) {
21+
* constructor(id: string, tools: Tools) {
2222
* super();
2323
* this.webhook = tools.get(Webhook);
2424
* }

tools/google-calendar/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default class extends Agent {
1919
private googleCalendar: GoogleCalendar;
2020
private auth: Auth;
2121

22-
constructor(tools: Tools) {
22+
constructor(id: string, tools: Tools) {
2323
super();
2424
this.googleCalendar = tools.get(GoogleCalendar);
2525
this.auth = tools.get(Auth);

tools/google-calendar/src/google-calendar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type AuthSuccessContext = {
5555
* class EventsAgent extends Agent {
5656
* private googleCalendar: GoogleCalendar;
5757
*
58-
* constructor(tools: Tools) {
58+
* constructor(id: string, tools: Tools) {
5959
* super();
6060
* this.googleCalendar = tools.get(GoogleCalendar);
6161
* }

0 commit comments

Comments
 (0)