diff --git a/.changeset/shaggy-snakes-grab.md b/.changeset/shaggy-snakes-grab.md new file mode 100644 index 0000000..eaeafca --- /dev/null +++ b/.changeset/shaggy-snakes-grab.md @@ -0,0 +1,5 @@ +--- +"@plotday/agent": minor +--- + +Changed: Renamed @plotday/sdk to @plotday/agent. diff --git a/.changeset/three-chicken-refuse.md b/.changeset/three-chicken-refuse.md new file mode 100644 index 0000000..4612e25 --- /dev/null +++ b/.changeset/three-chicken-refuse.md @@ -0,0 +1,7 @@ +--- +"@plotday/tool-outlook-calendar": patch +"@plotday/tool-google-calendar": patch +"@plotday/tool-google-contacts": patch +--- + +Changed: Updated to @plotday/agent diff --git a/README.md b/README.md index 1300ed4..3332b49 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ## Packages -- **[@plotday/sdk](./sdk)** - Core SDK with types, Agent class, built-in tool interfaces, and CLI +- **[@plotday/agent](./agent)** - Core SDK with types, Agent class, built-in tool interfaces, and CLI - **[tools/](./tools)** - Tools for building agents, including integrations with popular services - **[agents/](./agents)** - Full source code for several Plot agents @@ -23,10 +23,10 @@ You'll need a [Plot account](https://plot.day) to deploy agents. ```bash # Create a new agent -npx @plotday/sdk agent create +npx @plotday/agent create # Connect your Plot account -npx @plotday/sdk login +npx @plotday/agent login # Deploy your agent cd my-agent @@ -35,11 +35,11 @@ npm run deploy ## Documentation -See the [SDK documentation](./sdk/README.md) for detailed guides and API reference. +See the [SDK documentation](./agent/README.md) for detailed guides and API reference. ## Changelog -See the [SDK changelog](./sdk/CHANGELOG.md) for version history and release notes. +See the [SDK changelog](./agent/CHANGELOG.md) for version history and release notes. ## License diff --git a/RELEASING.md b/RELEASING.md index b60ed4f..6df0bcc 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -4,7 +4,7 @@ This repository uses [Changesets](https://github.com/changesets/changesets) to m ## Package Versioning Strategy -- **SDK** (`@plotday/sdk`): Independent versioning +- **SDK** (`@plotday/agent`): Independent versioning - **Tools** (`@plotday/tool-*`): Independent versioning - **Agents** (`@plotday/agent-*`): Not published, excluded from releases @@ -102,7 +102,7 @@ This tagging convention allows you to: Each GitHub release includes: -- **Title**: Package name and version (e.g., `@plotday/sdk@0.9.1`) +- **Title**: Package name and version (e.g., `@plotday/agent@0.9.1`) - **Release Notes**: Automatically extracted from the package's CHANGELOG.md for that version - **Assets**: None (packages are distributed via npm) @@ -121,7 +121,7 @@ If you need to create a GitHub release manually after publishing: ```bash # For SDK -gh release create sdk@0.9.1 --title "@plotday/sdk@0.9.1" --notes "Release notes here" +gh release create sdk@0.9.1 --title "@plotday/agent@0.9.1" --notes "Release notes here" # For a tool gh release create tool-google-calendar@0.1.0 --title "@plotday/tool-google-calendar@0.1.0" --notes "Release notes here" @@ -198,7 +198,7 @@ git push pnpm release # 5. (Optional) Create GitHub release manually -gh release create sdk@0.9.1 --title "@plotday/sdk@0.9.1" --notes "Release notes" +gh release create sdk@0.9.1 --title "@plotday/agent@0.9.1" --notes "Release notes" ``` ⚠️ This should only be done in emergencies. The automated workflow is preferred. diff --git a/agents/chat/package.json b/agents/chat/package.json index 7c29d5d..ca2fb1f 100644 --- a/agents/chat/package.json +++ b/agents/chat/package.json @@ -13,7 +13,7 @@ "lint": "plot agent lint" }, "dependencies": { - "@plotday/sdk": "workspace:^", + "@plotday/agent": "workspace:^", "typebox": "^1.0.35" }, "devDependencies": { diff --git a/agents/chat/src/index.ts b/agents/chat/src/index.ts index 39042d0..e4edeac 100644 --- a/agents/chat/src/index.ts +++ b/agents/chat/src/index.ts @@ -7,9 +7,9 @@ import { AuthorType, Tag, type ToolBuilder, -} from "@plotday/sdk"; -import { AI, type AIMessage } from "@plotday/sdk/tools/ai"; -import { ActivityAccess, Plot } from "@plotday/sdk/tools/plot"; +} from "@plotday/agent"; +import { AI, type AIMessage } from "@plotday/agent/tools/ai"; +import { ActivityAccess, Plot } from "@plotday/agent/tools/plot"; export default class ChatAgent extends Agent { build(build: ToolBuilder) { diff --git a/agents/chat/tsconfig.json b/agents/chat/tsconfig.json index 14c8a2b..47e94ca 100644 --- a/agents/chat/tsconfig.json +++ b/agents/chat/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "@plotday/sdk/tsconfig.base.json", + "extends": "@plotday/agent/tsconfig.base.json", "include": ["src/**/*.ts"] } diff --git a/agents/events/package.json b/agents/events/package.json index b9828d4..59d06a9 100644 --- a/agents/events/package.json +++ b/agents/events/package.json @@ -14,7 +14,7 @@ "logs": "plot agent logs" }, "dependencies": { - "@plotday/sdk": "workspace:^", + "@plotday/agent": "workspace:^", "@plotday/tool-google-calendar": "workspace:^", "@plotday/tool-outlook-calendar": "workspace:^" }, diff --git a/agents/events/src/index.ts b/agents/events/src/index.ts index 5b013d8..0fcd83f 100644 --- a/agents/events/src/index.ts +++ b/agents/events/src/index.ts @@ -6,14 +6,14 @@ import { Agent, type Priority, type ToolBuilder, -} from "@plotday/sdk"; +} from "@plotday/agent"; import type { Calendar, CalendarAuth, CalendarTool, SyncOptions, -} from "@plotday/sdk/common/calendar"; -import { ActivityAccess, Plot } from "@plotday/sdk/tools/plot"; +} from "@plotday/agent/common/calendar"; +import { ActivityAccess, Plot } from "@plotday/agent/tools/plot"; import { GoogleCalendar } from "@plotday/tool-google-calendar"; import { OutlookCalendar } from "@plotday/tool-outlook-calendar"; diff --git a/agents/events/tsconfig.json b/agents/events/tsconfig.json index 14c8a2b..47e94ca 100644 --- a/agents/events/tsconfig.json +++ b/agents/events/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "@plotday/sdk/tsconfig.base.json", + "extends": "@plotday/agent/tsconfig.base.json", "include": ["src/**/*.ts"] } diff --git a/sdk/.gitignore b/builder/.gitignore similarity index 100% rename from sdk/.gitignore rename to builder/.gitignore diff --git a/sdk/CHANGELOG.md b/builder/CHANGELOG.md similarity index 95% rename from sdk/CHANGELOG.md rename to builder/CHANGELOG.md index 3d1d794..3112bf5 100644 --- a/sdk/CHANGELOG.md +++ b/builder/CHANGELOG.md @@ -1,4 +1,4 @@ -# @plotday/sdk +# @plotday/agent ## 0.17.0 @@ -8,6 +8,12 @@ ### Changed +- **BREAKING: Package renamed from @plotday/sdk to @plotday/agent** + - Product name changed to "Plot Agent Builder" + - Directory renamed from `public/sdk/` to `public/builder/` + - Export `./sdk-docs` renamed to `./builder-docs` + - Function `getSDKDocumentation()` renamed to `getBuilderDocumentation()` + - See deprecation notice in @plotday/sdk@0.17.1 - BREAKING: Creating and updating Activity using the Plot tool now requires requesting permission in options ([#51](https://github.com/plotday/plot/pull/51) [`b3242e4`](https://github.com/plotday/plot/commit/b3242e4adecea87011379ac2dd58712dc91729d7)) - BREAKING: Agents and Tools now define a build() method to gain access to tools, which are then available via this.tools. - BREAKING: Renamed callCallback, run, cancel, and cancelAll Agent/Tool functions ([#51](https://github.com/plotday/plot/pull/51) [`49b4dc9`](https://github.com/plotday/plot/commit/49b4dc94e08906a89799903610325c5fe7ebe10b)) diff --git a/sdk/DOCS.md b/builder/DOCS.md similarity index 86% rename from sdk/DOCS.md rename to builder/DOCS.md index 4872267..9808475 100644 --- a/sdk/DOCS.md +++ b/builder/DOCS.md @@ -1,6 +1,6 @@ -# Plot SDK Documentation +# Plot Agent Builder Documentation -This directory contains the TypeDoc-generated API documentation for the Plot Agent SDK. +This directory contains the TypeDoc-generated API documentation for the Plot Agent Builder. ## Published Documentation @@ -8,7 +8,7 @@ The SDK documentation is automatically published to GitHub Pages whenever change **Live Documentation**: [https://plotday.github.io/plot/](https://plotday.github.io/plot/) -The documentation is automatically updated whenever changes to the SDK are merged into the main branch, ensuring developers always have access to the latest API reference. +The documentation is automatically updated whenever changes to the Builder are merged into the main branch, ensuring developers always have access to the latest API reference. ## Generating Documentation @@ -17,8 +17,8 @@ The documentation is automatically generated during the build process, but you c ### Generate Documentation ```bash -# From the SDK directory -pnpm docs +# From the Builder directory +pnpm build:docs ``` This will create the documentation in `dist/docs/` @@ -27,7 +27,7 @@ This will create the documentation in `dist/docs/` ```bash # Remove the generated docs -pnpm docs:clean +pnpm clean:docs ``` ## Viewing Documentation Locally @@ -40,6 +40,7 @@ pnpm docs:open ``` This script automatically uses the correct command for your platform: + - `open` on macOS - `xdg-open` on Linux - `start` on Windows @@ -73,13 +74,14 @@ The documentation is automatically published in two ways: ### 1. GitHub Pages (Automatic) -When changes to the SDK are pushed to the main branch, a GitHub Action automatically: -- Builds the SDK and generates the documentation +When changes to the Builder are pushed to the main branch, a GitHub Action automatically: + +- Builds the Builder and generates the documentation - Deploys it to GitHub Pages at [https://plotday.github.io/plot/](https://plotday.github.io/plot/) **Workflow Location**: `.github/workflows/deploy-sdk-docs.yml` -**Trigger**: Automatic on push to `main` when files in `public/sdk/**` change +**Trigger**: Automatic on push to `main` when files in `public/agent/**` change ### 2. npm Package (Manual) @@ -103,7 +105,7 @@ The `deploy-sdk-docs.yml` workflow includes all necessary permissions and config The documentation generation is configured in `typedoc.json`. Key settings: -- **Entry Points**: Main SDK exports (agent, tool, plot, tools/*) +- **Entry Points**: Main SDK exports (agent, tool, plot, tools/\*) - **Output**: `dist/docs/` - **Visibility**: Public APIs only (excludes private/protected/internal members) - **Theme**: Default TypeDoc theme optimized for GitHub Pages @@ -128,11 +130,11 @@ When adding new public APIs: 3. Use `@returns` tag for return values 4. Use `@example` tags to show usage examples 5. Use `@see` tags to link to related APIs -6. Regenerate docs with `pnpm docs` to verify formatting +6. Regenerate docs with `pnpm build:docs` to verify formatting ### JSDoc Example -```typescript +````typescript /** * Creates a new activity in the current priority. * @@ -159,11 +161,11 @@ When adding new public APIs: * @see {@link ActivityType} for available activity types */ abstract createActivity(activity: NewActivity): Promise; -``` +```` ## Support For issues or questions about the documentation: -- Open an issue at https://github.com/plotday/plot/issues +- Open an issue at - Tag it with the `documentation` label diff --git a/sdk/LICENSE b/builder/LICENSE similarity index 100% rename from sdk/LICENSE rename to builder/LICENSE diff --git a/sdk/README.md b/builder/README.md similarity index 87% rename from sdk/README.md rename to builder/README.md index 76fe459..a9ba740 100644 --- a/sdk/README.md +++ b/builder/README.md @@ -4,10 +4,10 @@

- Plot Agent SDK + Plot Agent Builder

- The official SDK for building Plot agents -
+ The official Builder for building Plot agents -
custom code that organizes and prioritizes all your messages, tasks, and apps.

@@ -17,6 +17,10 @@ --- +> **⚠️ DEPRECATED:** This package has been renamed to **@plotday/agent**. Please use [@plotday/agent](https://www.npmjs.com/package/@plotday/agent) instead. + +--- + ## Quick Start Choose your path: @@ -42,8 +46,8 @@ I want an agent that: **2. Deploy:** ```bash -npx @plotday/sdk login -npx @plotday/sdk agent deploy +npx @plotday/agent login +npx @plotday/agent deploy ``` That's it! [Learn more →](https://build.plot.day/GETTING_STARTED.html#no-code-agents) @@ -55,14 +59,14 @@ Build agents with TypeScript for maximum flexibility. **1. Create a new agent:** ```bash -npx @plotday/sdk agent create +npx @plotday/agent create ``` **2. Implement your agent:** ```typescript -import { Agent, ActivityType, type Priority, type ToolBuilder } from "@plotday/sdk"; -import { Plot } from "@plotday/sdk/tools/plot"; +import { Agent, ActivityType, type Priority, type ToolBuilder } from "@plotday/agent"; +import { Plot } from "@plotday/agent/tools/plot"; export default class MyAgent extends Agent { build(build: ToolBuilder) { @@ -146,10 +150,10 @@ await this.tools.plot.createActivity({ plot login # Agent management -plot agent create # Create new agent project -plot agent generate # Generate code from plot-agent.md -plot agent deploy # Deploy to Plot -plot agent link # Activate for a priority +plot create # Create new agent project +plot generate # Generate code from plot-agent.md +plot deploy # Deploy to Plot +plot logs # Stream real-time agent logs # Priority management plot priority list # List all priorities @@ -228,11 +232,11 @@ export default class GitHubAgent extends Agent { ## TypeScript Configuration -Extend the SDK's base configuration in your `tsconfig.json`: +Extend the Builder's base configuration in your `tsconfig.json`: ```json { - "extends": "@plotday/sdk/tsconfig.base.json", + "extends": "@plotday/agent/tsconfig.base.json", "include": ["src/*.ts"] } ``` diff --git a/sdk/cli/commands/agent-logs.ts b/builder/cli/commands/agent-logs.ts similarity index 100% rename from sdk/cli/commands/agent-logs.ts rename to builder/cli/commands/agent-logs.ts diff --git a/sdk/cli/commands/build.ts b/builder/cli/commands/build.ts similarity index 100% rename from sdk/cli/commands/build.ts rename to builder/cli/commands/build.ts diff --git a/sdk/cli/commands/create.ts b/builder/cli/commands/create.ts similarity index 97% rename from sdk/cli/commands/create.ts rename to builder/cli/commands/create.ts index 4de846e..27f1e3b 100644 --- a/sdk/cli/commands/create.ts +++ b/builder/cli/commands/create.ts @@ -103,7 +103,7 @@ export async function createCommand(options: CreateOptions) { deploy: "plot agent deploy", }, dependencies: { - "@plotday/sdk": sdkVersion, + "@plotday/agent": sdkVersion, }, devDependencies: { typescript: "^5.8.3", @@ -117,7 +117,7 @@ export async function createCommand(options: CreateOptions) { // Create tsconfig.json const tsconfigJson = { - extends: "@plotday/sdk/tsconfig.base.json", + extends: "@plotday/agent/tsconfig.base.json", include: ["src/*.ts"], }; fs.writeFileSync( @@ -130,8 +130,8 @@ export async function createCommand(options: CreateOptions) { Agent, type Priority, type ToolBuilder, -} from "@plotday/sdk"; -import { Plot } from "@plotday/sdk/tools/plot"; +} from "@plotday/agent"; +import { Plot } from "@plotday/agent/tools/plot"; export default class MyAgent extends Agent { build(build: ToolBuilder) { diff --git a/sdk/cli/commands/deploy.ts b/builder/cli/commands/deploy.ts similarity index 99% rename from sdk/cli/commands/deploy.ts rename to builder/cli/commands/deploy.ts index f32f869..de9e894 100644 --- a/sdk/cli/commands/deploy.ts +++ b/builder/cli/commands/deploy.ts @@ -291,7 +291,7 @@ export async function deployCommand(options: DeployOptions) { process.exit(1); } else { out.success("Validation passed - agent is ready to deploy"); - out.info("Run without --dry-run to deploy", [`plot agent deploy`]); + out.info("Run without --dry-run to deploy", [`plot deploy`]); } return; } diff --git a/sdk/cli/commands/generate.ts b/builder/cli/commands/generate.ts similarity index 96% rename from sdk/cli/commands/generate.ts rename to builder/cli/commands/generate.ts index 9058d85..fca4b27 100644 --- a/sdk/cli/commands/generate.ts +++ b/builder/cli/commands/generate.ts @@ -259,7 +259,7 @@ export async function generateCommand(options: GenerateOptions) { // Write tsconfig.json const tsconfigContent = { - extends: "@plotday/sdk/tsconfig.base.json", + extends: "@plotday/agent/tsconfig.base.json", include: ["src/*.ts"], }; writeFile(tsconfigPath, JSON.stringify(tsconfigContent, null, 2) + "\n"); @@ -310,16 +310,16 @@ export async function generateCommand(options: GenerateOptions) { // Detect package manager and install dependencies const packageManager = detectPackageManager(); - // Update @plotday/sdk to latest and install packages + // Update @plotday/agent to latest and install packages try { out.progress("Updating SDK to latest version..."); const updateCommand = packageManager === "npm" - ? "npm install @plotday/sdk@latest" + ? "npm install @plotday/agent@latest" : packageManager === "pnpm" - ? "pnpm add @plotday/sdk@latest" - : "yarn add @plotday/sdk@latest"; + ? "pnpm add @plotday/agent@latest" + : "yarn add @plotday/agent@latest"; execSync(updateCommand, { cwd: agentPath, stdio: "ignore" }); @@ -333,7 +333,7 @@ export async function generateCommand(options: GenerateOptions) { out.success("Dependencies installed."); } catch (error) { out.warning("Couldn't install dependencies", [ - `Run '${packageManager} install @plotday/sdk@latest' in ${options.dir}`, + `Run '${packageManager} install @plotday/agent@latest' in ${options.dir}`, `Then run '${ packageManager === "yarn" ? "yarn" : `${packageManager} install` }'`, diff --git a/sdk/cli/commands/lint.ts b/builder/cli/commands/lint.ts similarity index 100% rename from sdk/cli/commands/lint.ts rename to builder/cli/commands/lint.ts diff --git a/sdk/cli/commands/login.ts b/builder/cli/commands/login.ts similarity index 97% rename from sdk/cli/commands/login.ts rename to builder/cli/commands/login.ts index a0a23ff..088325e 100644 --- a/sdk/cli/commands/login.ts +++ b/builder/cli/commands/login.ts @@ -84,7 +84,7 @@ export async function loginCommand(options: LoginOptions) { const sessionId = crypto.randomUUID(); // Construct login URL - const loginUrl = `${options.siteUrl}/sdk/login?session=${sessionId}`; + const loginUrl = `${options.siteUrl}/agent/login?session=${sessionId}`; // Open browser openBrowser(loginUrl); diff --git a/sdk/cli/commands/priority-create.ts b/builder/cli/commands/priority-create.ts similarity index 100% rename from sdk/cli/commands/priority-create.ts rename to builder/cli/commands/priority-create.ts diff --git a/sdk/cli/commands/priority-list.ts b/builder/cli/commands/priority-list.ts similarity index 100% rename from sdk/cli/commands/priority-list.ts rename to builder/cli/commands/priority-list.ts diff --git a/sdk/cli/index.ts b/builder/cli/index.ts similarity index 96% rename from sdk/cli/index.ts rename to builder/cli/index.ts index a6c60ef..67e0890 100644 --- a/sdk/cli/index.ts +++ b/builder/cli/index.ts @@ -48,10 +48,8 @@ program return loginCommand(opts); }); -// Agent subcommand group -const agent = program.command("agent").description("Manage Plot agents"); - -agent +// Top-level create command +program .command("create") .description("Create a new Plot agent") .option("-d, --dir ", "Directory to create the agent in") @@ -59,19 +57,22 @@ agent .option("--display-name ", "Display name for the agent") .action(createCommand); -agent +// Top-level lint command +program .command("lint") .description("Check for build or lint errors") .option("-d, --dir ", "Agent directory to lint", process.cwd()) .action(lintCommand); -agent +// Top-level build command +program .command("build") .description("Bundle the agent without deploying") .option("-d, --dir ", "Agent directory to build", process.cwd()) .action(buildCommand); -agent +// Top-level generate command +program .command("generate") .description("Generate agent code from a spec file") .option("-d, --dir ", "Agent directory to generate in", process.cwd()) @@ -89,7 +90,8 @@ agent return generateCommand(opts); }); -agent +// Top-level deploy command +program .command("deploy") .description("Bundle and deploy the agent") .option("-d, --dir ", "Agent directory to deploy", process.cwd()) @@ -117,7 +119,8 @@ agent return deployCommand(opts); }); -agent +// Top-level logs command +program .command("logs [agent-id]") .description("Stream real-time logs from an agent") .option("-d, --dir ", "Agent directory", process.cwd()) diff --git a/sdk/cli/templates/AGENTS.template.md b/builder/cli/templates/AGENTS.template.md similarity index 92% rename from sdk/cli/templates/AGENTS.template.md rename to builder/cli/templates/AGENTS.template.md index 98efe18..fd194f8 100644 --- a/sdk/cli/templates/AGENTS.template.md +++ b/builder/cli/templates/AGENTS.template.md @@ -25,8 +25,8 @@ import { Agent, type Priority, type ToolBuilder, -} from "@plotday/sdk"; -import { Plot } from "@plotday/sdk/tools/plot"; +} from "@plotday/agent"; +import { Plot } from "@plotday/agent/tools/plot"; export default class MyAgent extends Agent { build(build: ToolBuilder) { @@ -67,19 +67,19 @@ IMPORTANT: HTTP access is restricted to URLs requested via `build(Network, { url ### Built-in Tools (Always Available) -For complete API documentation of built-in tools including all methods, types, and detailed examples, see the TypeScript definitions in your installed package at `node_modules/@plotday/sdk/src/tools/*.ts`. Each tool file contains comprehensive JSDoc documentation. +For complete API documentation of built-in tools including all methods, types, and detailed examples, see the TypeScript definitions in your installed package at `node_modules/@plotday/agent/src/tools/*.ts`. Each tool file contains comprehensive JSDoc documentation. **Quick reference - Available tools:** -- `@plotday/sdk/tools/plot` - Core data layer (create/update activities, priorities, contacts) -- `@plotday/sdk/tools/ai` - LLM integration (text generation, structured output, reasoning) +- `@plotday/agent/tools/plot` - Core data layer (create/update activities, priorities, contacts) +- `@plotday/agent/tools/ai` - LLM integration (text generation, structured output, reasoning) - Use ModelPreferences to specify `speed` (fast/balanced/capable) and `cost` (low/medium/high) -- `@plotday/sdk/tools/store` - Persistent key-value storage (also via `this.set()`, `this.get()`) -- `@plotday/sdk/tools/tasks` - Queue batched work (also via `this.run()`) -- `@plotday/sdk/tools/callbacks` - Persistent function references (also via `this.callback()`) -- `@plotday/sdk/tools/integrations` - OAuth2 authentication flows -- `@plotday/sdk/tools/network` - HTTP access permissions and webhook management -- `@plotday/sdk/tools/agents` - Manage other agents +- `@plotday/agent/tools/store` - Persistent key-value storage (also via `this.set()`, `this.get()`) +- `@plotday/agent/tools/tasks` - Queue batched work (also via `this.run()`) +- `@plotday/agent/tools/callbacks` - Persistent function references (also via `this.callback()`) +- `@plotday/agent/tools/integrations` - OAuth2 authentication flows +- `@plotday/agent/tools/network` - HTTP access permissions and webhook management +- `@plotday/agent/tools/agents` - Manage other agents **Critical**: Never use instance variables for state. They are lost after function execution. Always use Store methods. @@ -90,7 +90,7 @@ Add tool dependencies to `package.json`: ```json { "dependencies": { - "@plotday/sdk": "workspace:^", + "@plotday/agent": "workspace:^", "@plotday/tool-google-calendar": "workspace:^" } } @@ -163,7 +163,7 @@ async activity(activity: Activity) { Activity links enable user interaction: ```typescript -import { type ActivityLink, ActivityLinkType } from "@plotday/sdk"; +import { type ActivityLink, ActivityLinkType } from "@plotday/agent"; // URL link const urlLink: ActivityLink = { diff --git a/sdk/cli/templates/CLAUDE.template.md b/builder/cli/templates/CLAUDE.template.md similarity index 100% rename from sdk/cli/templates/CLAUDE.template.md rename to builder/cli/templates/CLAUDE.template.md diff --git a/sdk/cli/templates/README.template.md b/builder/cli/templates/README.template.md similarity index 97% rename from sdk/cli/templates/README.template.md rename to builder/cli/templates/README.template.md index a3f93a7..3f41d17 100644 --- a/sdk/cli/templates/README.template.md +++ b/builder/cli/templates/README.template.md @@ -75,7 +75,7 @@ Add external tool dependencies to `package.json`: ```json { "dependencies": { - "@plotday/sdk": "workspace:^", + "@plotday/agent": "workspace:^", "@plotday/tool-google-calendar": "workspace:^" } } @@ -178,7 +178,7 @@ Test your agent locally before deploying: ## Resources -- [Plot SDK Documentation](https://github.com/plotday/plot) +- [Plot Agent Builder Documentation](https://github.com/plotday/plot) - [Agent Examples](https://github.com/plotday/plot/tree/main/libs/agent/examples) - [Tool Documentation](https://github.com/plotday/plot/tree/main/libs/agent/tools) diff --git a/sdk/cli/utils/bundle.ts b/builder/cli/utils/bundle.ts similarity index 100% rename from sdk/cli/utils/bundle.ts rename to builder/cli/utils/bundle.ts diff --git a/sdk/cli/utils/output.ts b/builder/cli/utils/output.ts similarity index 100% rename from sdk/cli/utils/output.ts rename to builder/cli/utils/output.ts diff --git a/sdk/cli/utils/packageManager.ts b/builder/cli/utils/packageManager.ts similarity index 100% rename from sdk/cli/utils/packageManager.ts rename to builder/cli/utils/packageManager.ts diff --git a/sdk/cli/utils/sse.ts b/builder/cli/utils/sse.ts similarity index 100% rename from sdk/cli/utils/sse.ts rename to builder/cli/utils/sse.ts diff --git a/sdk/cli/utils/token.ts b/builder/cli/utils/token.ts similarity index 100% rename from sdk/cli/utils/token.ts rename to builder/cli/utils/token.ts diff --git a/sdk/docs/ADVANCED.md b/builder/docs/ADVANCED.md similarity index 99% rename from sdk/docs/ADVANCED.md rename to builder/docs/ADVANCED.md index d8f3552..137ed96 100644 --- a/sdk/docs/ADVANCED.md +++ b/builder/docs/ADVANCED.md @@ -29,8 +29,8 @@ import { GitHubTool } from "@mycompany/plot-github-tool"; import { JiraTool } from "@mycompany/plot-jira-tool"; import { SlackTool } from "@mycompany/plot-slack-tool"; -import { Agent, type Priority, type ToolBuilder } from "@plotday/sdk"; -import { Plot } from "@plotday/sdk/tools/plot"; +import { Agent, type Priority, type ToolBuilder } from "@plotday/agent"; +import { Plot } from "@plotday/agent/tools/plot"; export default class DevOpsAgent extends Agent { build(build: ToolBuilder) { diff --git a/sdk/docs/BUILDING_TOOLS.md b/builder/docs/BUILDING_TOOLS.md similarity index 95% rename from sdk/docs/BUILDING_TOOLS.md rename to builder/docs/BUILDING_TOOLS.md index b217e78..226539c 100644 --- a/sdk/docs/BUILDING_TOOLS.md +++ b/builder/docs/BUILDING_TOOLS.md @@ -49,7 +49,7 @@ Tools extend the `Tool` base class and can access other tools through depende ### Minimal Tool Example ```typescript -import { Tool, type ToolBuilder } from "@plotday/sdk"; +import { Tool, type ToolBuilder } from "@plotday/agent"; export class HelloTool extends Tool { async sayHello(name: string): Promise { @@ -61,7 +61,7 @@ export class HelloTool extends Tool { ### Using Your Tool ```typescript -import { Agent, type ToolBuilder } from "@plotday/sdk"; +import { Agent, type ToolBuilder } from "@plotday/agent"; import { HelloTool } from "./tools/hello"; @@ -86,7 +86,7 @@ export default class MyAgent extends Agent { ### Class Definition ```typescript -import { Tool, type ToolBuilder } from "@plotday/sdk"; +import { Tool, type ToolBuilder } from "@plotday/agent"; // Tool class with type parameter export class MyTool extends Tool { @@ -225,9 +225,9 @@ Tools can depend on other tools, including built-in tools. ### Declaring Dependencies ```typescript -import { Tool, type ToolBuilder } from "@plotday/sdk"; -import { Network } from "@plotday/sdk/tools/network"; -import { Store } from "@plotday/sdk/tools/store"; +import { Tool, type ToolBuilder } from "@plotday/agent"; +import { Network } from "@plotday/agent/tools/network"; +import { Store } from "@plotday/agent/tools/store"; export class GitHubTool extends Tool { // Declare dependencies @@ -292,7 +292,7 @@ Tools can accept configuration options when declared. ### Defining Options ```typescript -import { Tool, type ToolBuilder, type InferOptions } from "@plotday/sdk"; +import { Tool, type ToolBuilder, type InferOptions } from "@plotday/agent"; export class SlackTool extends Tool { // Define static Options type @@ -354,10 +354,10 @@ static Options = { A complete GitHub integration with webhooks and issue management. ```typescript -import { type Priority, Tool, type ToolBuilder } from "@plotday/sdk"; -import { ActivityLinkType, ActivityType } from "@plotday/sdk"; -import { Network, type WebhookRequest } from "@plotday/sdk/tools/network"; -import { Plot } from "@plotday/sdk/tools/plot"; +import { type Priority, Tool, type ToolBuilder } from "@plotday/agent"; +import { ActivityLinkType, ActivityType } from "@plotday/agent"; +import { Network, type WebhookRequest } from "@plotday/agent/tools/network"; +import { Plot } from "@plotday/agent/tools/plot"; export class GitHubTool extends Tool { static Options = { @@ -490,8 +490,8 @@ export class GitHubTool extends Tool { A tool for sending Slack notifications. ```typescript -import { Tool, type ToolBuilder } from "@plotday/sdk"; -import { Network } from "@plotday/sdk/tools/network"; +import { Tool, type ToolBuilder } from "@plotday/agent"; +import { Network } from "@plotday/agent/tools/network"; export class SlackTool extends Tool { static Options = { @@ -583,8 +583,8 @@ describe("GitHubTool", () => { Test your tool with a real agent: ```typescript -import { Agent, type ToolBuilder } from "@plotday/sdk"; -import { Plot } from "@plotday/sdk/tools/plot"; +import { Agent, type ToolBuilder } from "@plotday/agent"; +import { Plot } from "@plotday/agent/tools/plot"; import { GitHubTool } from "./github-tool"; @@ -637,10 +637,10 @@ my-plot-tool/ "test": "vitest" }, "peerDependencies": { - "@plotday/sdk": "^0.16.0" + "@plotday/agent": "^0.16.0" }, "devDependencies": { - "@plotday/sdk": "^0.16.0", + "@plotday/agent": "^0.16.0", "typescript": "^5.0.0" } } diff --git a/sdk/docs/CLI_REFERENCE.md b/builder/docs/CLI_REFERENCE.md similarity index 83% rename from sdk/docs/CLI_REFERENCE.md rename to builder/docs/CLI_REFERENCE.md index b2e5bee..95a4b51 100644 --- a/sdk/docs/CLI_REFERENCE.md +++ b/builder/docs/CLI_REFERENCE.md @@ -19,14 +19,14 @@ Complete reference for the Plot CLI (`plot` command). ## Installation -The Plot CLI is included with the SDK: +The Plot CLI is included with the Builder: ```bash # Run directly with npx -npx @plotday/sdk [command] +npx @plotday/agent [command] # Or install globally -npm install -g @plotday/sdk +npm install -g @plotday/agent plot [command] ``` @@ -54,12 +54,12 @@ This will: ## Agent Commands -### plot agent create +### plot create Scaffold a new agent project with TypeScript. ```bash -plot agent create [options] +plot create [options] ``` **Options:** @@ -71,7 +71,7 @@ plot agent create [options] **Example:** ```bash -plot agent create --name my-calendar-agent --display-name "My Calendar Agent" +plot create --name my-calendar-agent --display-name "My Calendar Agent" ``` **Creates:** @@ -87,12 +87,12 @@ my-calendar-agent/ --- -### plot agent generate +### plot generate Generate TypeScript code from a natural language `plot-agent.md` specification. ```bash -plot agent generate [options] +plot generate [options] ``` **Options:** @@ -104,17 +104,17 @@ plot agent generate [options] **Example:** ```bash -plot agent generate --input ./my-spec.md --output ./src +plot generate --input ./my-spec.md --output ./src ``` --- -### plot agent lint +### plot lint Check agent code for errors without deploying. ```bash -plot agent lint [options] +plot lint [options] ``` **Options:** @@ -124,17 +124,17 @@ plot agent lint [options] **Example:** ```bash -plot agent lint --dir ./my-agent +plot lint --dir ./my-agent ``` --- -### plot agent deploy +### plot deploy Deploy an agent to Plot. ```bash -plot agent deploy [options] +plot deploy [options] ``` **Options:** @@ -155,37 +155,41 @@ plot agent deploy [options] ```bash # Deploy new agent -plot agent deploy +plot deploy # Update existing agent -plot agent deploy --agent-id ag_1234567890 +plot deploy --agent-id ag_1234567890 # Dry run -plot agent deploy --dry-run +plot deploy --dry-run ``` --- -### plot agent link +### plot logs -Link (activate) an agent to a priority. +Stream real-time logs from an agent. ```bash -plot agent link [options] +plot logs [agent-id] [options] ``` **Options:** -- `--agent-id ` - Agent to link (required) -- `--priority-id ` - Priority to link to (required) +- `--id ` - Agent ID +- `--dir ` - Agent directory (default: current directory) +- `--environment ` - Agent environment (personal, private, review) (default: personal) +- `--deploy-token ` - Authentication token **Example:** ```bash -plot agent link --agent-id ag_1234567890 --priority-id pr_0987654321 -``` +# Stream logs for an agent +plot logs ag_1234567890 -After linking, the agent's `activate()` method will be called for that priority. +# Stream logs using agent in current directory +plot logs --dir ./my-agent +``` --- @@ -307,7 +311,7 @@ plot agent deploy ```bash # 1. Create project -plot agent create --name my-agent +plot create --name my-agent # 2. Navigate to directory cd my-agent @@ -331,7 +335,7 @@ npm run deploy npm run build # 3. Deploy update -plot agent deploy --agent-id ag_1234567890 +plot deploy --agent-id ag_1234567890 ``` ### No-Code Agent Deployment @@ -344,7 +348,7 @@ plot agent deploy --agent-id ag_1234567890 plot login # 3. Deploy directly from spec -plot agent deploy +plot deploy ``` --- @@ -368,17 +372,17 @@ plot login npm run build # Or use lint command -plot agent lint +plot lint ``` ### Deployment Failures ```bash # Try dry run first -plot agent deploy --dry-run +plot deploy --dry-run # Enable verbose logging -plot agent deploy --verbose +plot deploy --verbose ``` --- diff --git a/sdk/docs/CORE_CONCEPTS.md b/builder/docs/CORE_CONCEPTS.md similarity index 98% rename from sdk/docs/CORE_CONCEPTS.md rename to builder/docs/CORE_CONCEPTS.md index 72f2618..80b9b37 100644 --- a/sdk/docs/CORE_CONCEPTS.md +++ b/builder/docs/CORE_CONCEPTS.md @@ -34,8 +34,8 @@ An agent is a class that: ### Agent Anatomy ```typescript -import { Agent, type Priority, type ToolBuilder } from "@plotday/sdk"; -import { Plot } from "@plotday/sdk/tools/plot"; +import { Agent, type Priority, type ToolBuilder } from "@plotday/agent"; +import { Plot } from "@plotday/agent/tools/plot"; export default class MyAgent extends Agent { // 1. Declare dependencies @@ -80,7 +80,7 @@ Tools provide functionality to agents. They encapsulate reusable capabilities an #### 1. Built-in Tools -Core Plot functionality provided by the SDK: +Core Plot functionality provided by the Builder: - **Plot** - Create and manage activities and priorities - **Store** - Persistent key-value storage @@ -209,7 +209,7 @@ Activities are the core data type in Plot, representing tasks, events, and notes - **Event** - Scheduled occurrences with start/end times ```typescript -import { ActivityType } from "@plotday/sdk"; +import { ActivityType } from "@plotday/agent"; // Note await this.tools.plot.createActivity({ @@ -255,7 +255,7 @@ type Activity = { Links enable user interaction with activities: ```typescript -import { ActivityLinkType } from "@plotday/sdk"; +import { ActivityLinkType } from "@plotday/agent"; await this.tools.plot.createActivity({ type: ActivityType.Task, diff --git a/sdk/docs/GETTING_STARTED.md b/builder/docs/GETTING_STARTED.md similarity index 93% rename from sdk/docs/GETTING_STARTED.md rename to builder/docs/GETTING_STARTED.md index 7b9c787..43e0ffe 100644 --- a/sdk/docs/GETTING_STARTED.md +++ b/builder/docs/GETTING_STARTED.md @@ -45,10 +45,10 @@ You'll need a [Plot account](https://plot.day) to deploy agents. ```bash # Login to Plot -npx @plotday/sdk login +npx @plotday/agent login # Deploy directly from your spec -npx @plotday/sdk agent deploy +npx @plotday/agent deploy ``` That's it! Your agent is now live in Plot. @@ -59,11 +59,11 @@ If you want to review or customize the generated code before deploying: ```bash # Generate TypeScript code from your spec -npx @plotday/sdk agent generate +npx @plotday/agent generate # Review and edit the generated src/index.ts # Then deploy -npx @plotday/sdk agent deploy +npx @plotday/agent deploy ``` The `generate` command creates a complete TypeScript agent that you can modify and extend. @@ -79,11 +79,11 @@ Build agents with full control using TypeScript. Use the Plot CLI to scaffold a new agent: ```bash -npx @plotday/sdk agent create +npx @plotday/agent create # or -yarn dlx @plotday/sdk agent create +yarn dlx @plotday/agent create # or -pnpm dlx @plotday/sdk agent create +pnpm dlx @plotday/agent create ``` You'll be prompted for: @@ -113,8 +113,8 @@ import { Agent, type Priority, type ToolBuilder, -} from "@plotday/sdk"; -import { Plot } from "@plotday/sdk/tools/plot"; +} from "@plotday/agent"; +import { Plot } from "@plotday/agent/tools/plot"; export default class MyAgent extends Agent { // Declare tool dependencies @@ -191,11 +191,11 @@ Contains agent metadata: ### TypeScript Config (tsconfig.json) -Extends the SDK's base configuration: +Extends the Builder's base configuration: ```json { - "extends": "@plotday/sdk/tsconfig.base.json", + "extends": "@plotday/agent/tsconfig.base.json", "include": ["src/*.ts"] } ``` diff --git a/sdk/docs/RUNTIME.md b/builder/docs/RUNTIME.md similarity index 100% rename from sdk/docs/RUNTIME.md rename to builder/docs/RUNTIME.md diff --git a/sdk/docs/TOOLS_GUIDE.md b/builder/docs/TOOLS_GUIDE.md similarity index 97% rename from sdk/docs/TOOLS_GUIDE.md rename to builder/docs/TOOLS_GUIDE.md index fb88976..bda6072 100644 --- a/sdk/docs/TOOLS_GUIDE.md +++ b/builder/docs/TOOLS_GUIDE.md @@ -26,7 +26,7 @@ The Plot tool is the core interface for creating and managing activities and pri ### Setup ```typescript -import { Plot } from "@plotday/sdk/tools/plot"; +import { Plot } from "@plotday/agent/tools/plot"; build(build: ToolBuilder) { return { @@ -38,7 +38,7 @@ build(build: ToolBuilder) { ### Creating Activities ```typescript -import { ActivityLinkType, ActivityType } from "@plotday/sdk"; +import { ActivityLinkType, ActivityType } from "@plotday/agent"; // Create a note await this.tools.plot.createActivity({ @@ -236,7 +236,7 @@ OAuth authentication for external services (Google, Microsoft, etc.). ### Setup ```typescript -import { Integrations } from "@plotday/sdk/tools/integrations"; +import { Integrations } from "@plotday/agent/tools/integrations"; build(build: ToolBuilder) { return { @@ -248,8 +248,8 @@ build(build: ToolBuilder) { ### Requesting Authentication ```typescript -import { AuthLevel, AuthProvider, type Authorization } from "@plotday/sdk/tools/integrations"; -import { ActivityLinkType } from "@plotday/sdk"; +import { AuthLevel, AuthProvider, type Authorization } from "@plotday/agent/tools/integrations"; +import { ActivityLinkType } from "@plotday/agent"; async activate(priority: Pick) { // Create callback for auth completion @@ -432,7 +432,7 @@ Request HTTP access and create webhook endpoints for real-time notifications. ### Setup ```typescript -import { Network, type WebhookRequest } from "@plotday/sdk/tools/network"; +import { Network, type WebhookRequest } from "@plotday/agent/tools/network"; build(build: ToolBuilder) { return { @@ -596,7 +596,7 @@ Prompt large language models with support for structured output and tool calling ### Setup ```typescript -import { AI } from "@plotday/sdk/tools/ai"; +import { AI } from "@plotday/agent/tools/ai"; build(build: ToolBuilder) { return { diff --git a/sdk/docs/index.md b/builder/docs/index.md similarity index 90% rename from sdk/docs/index.md rename to builder/docs/index.md index e0174f7..7dd18af 100644 --- a/sdk/docs/index.md +++ b/builder/docs/index.md @@ -1,4 +1,4 @@ -Welcome to the Plot Agent SDK documentation! This comprehensive guide will help you build powerful agents that organize and prioritize activities in Plot. +Welcome to the Plot Agent Builder documentation! This comprehensive guide will help you build powerful agents that organize and prioritize activities in Plot. ## What are Plot Agents? @@ -74,7 +74,7 @@ Explore the complete API documentation using the navigation on the left: - [Plot Website](https://plot.day) - [GitHub Repository](https://github.com/plotday/plot) -- [NPM Package](https://www.npmjs.com/package/@plotday/sdk) +- [NPM Package](https://www.npmjs.com/package/@plotday/agent) - [Report Issues](https://github.com/plotday/plot/issues) ## Examples @@ -89,8 +89,8 @@ import { Agent, type Priority, type ToolBuilder, -} from "@plotday/sdk"; -import { Plot } from "@plotday/sdk/tools/plot"; +} from "@plotday/agent"; +import { Plot } from "@plotday/agent/tools/plot"; export default class WelcomeAgent extends Agent { build(build: ToolBuilder) { @@ -111,9 +111,9 @@ export default class WelcomeAgent extends Agent { ### Calendar Sync Agent ```typescript -import { type Activity, Agent, type ToolBuilder } from "@plotday/sdk"; -import { Network } from "@plotday/sdk/tools/network"; -import { Plot } from "@plotday/sdk/tools/plot"; +import { type Activity, Agent, type ToolBuilder } from "@plotday/agent"; +import { Network } from "@plotday/agent/tools/network"; +import { Plot } from "@plotday/agent/tools/plot"; export default class CalendarAgent extends Agent { build(build: ToolBuilder) { diff --git a/sdk/package.json b/builder/package.json similarity index 89% rename from sdk/package.json rename to builder/package.json index 83f92d0..1304a6b 100644 --- a/sdk/package.json +++ b/builder/package.json @@ -1,7 +1,7 @@ { - "name": "@plotday/sdk", + "name": "@plotday/agent", "version": "0.17.0", - "description": "SDK for building Plot agents - intelligent assistants that organize and prioritize your activities", + "description": "Plot Agent Builder - Build intelligent agents that organize and prioritize your activities", "packageManager": "pnpm@10.18.3", "type": "module", "main": "./dist/index.js", @@ -74,9 +74,9 @@ "types": "./dist/agents-guide.d.ts", "default": "./dist/agents-guide.js" }, - "./sdk-docs": { - "types": "./dist/sdk-docs.d.ts", - "default": "./dist/sdk-docs.js" + "./builder-docs": { + "types": "./dist/builder-docs.d.ts", + "default": "./dist/builder-docs.js" }, "./llm-docs": { "types": "./dist/llm-docs/index.d.ts", @@ -148,10 +148,12 @@ "scripts": { "lint": "tsc --noEmit", "prebuild": "tsx prebuild.ts", - "build": "tsx prebuild.ts && tsc --project tsconfig.build.json && tsc --project tsconfig.cli.json && node postbuild.js && pnpm docs", - "docs": "typedoc", + "build": "pnpm build:builder && pnpm build:cli && pnpm build:docs", + "build:builder": "tsx prebuild.ts && tsc --project tsconfig.build.json", + "build:cli": "tsc --project tsconfig.cli.json && node postbuild.js", + "build:docs": "typedoc", "docs:open": "open dist/docs/index.html || xdg-open dist/docs/index.html || start dist/docs/index.html", - "docs:clean": "rm -rf dist/docs", + "clean:docs": "rm -rf dist/docs", "clean": "rm -rf dist bin" }, "dependencies": { @@ -178,7 +180,7 @@ "repository": { "type": "git", "url": "https://github.com/plotday/plot.git", - "directory": "sdk" + "directory": "builder" }, "homepage": "https://build.plot.day", "bugs": { @@ -187,7 +189,7 @@ "keywords": [ "plot", "agent", - "sdk", + "builder", "automation", "productivity", "calendar", diff --git a/sdk/postbuild.js b/builder/postbuild.js similarity index 100% rename from sdk/postbuild.js rename to builder/postbuild.js diff --git a/sdk/prebuild.ts b/builder/prebuild.ts similarity index 100% rename from sdk/prebuild.ts rename to builder/prebuild.ts diff --git a/sdk/src/agent.ts b/builder/src/agent.ts similarity index 100% rename from sdk/src/agent.ts rename to builder/src/agent.ts diff --git a/sdk/src/agents-guide.ts b/builder/src/agents-guide.ts similarity index 100% rename from sdk/src/agents-guide.ts rename to builder/src/agents-guide.ts diff --git a/sdk/src/sdk-docs.ts b/builder/src/builder-docs.ts similarity index 58% rename from sdk/src/sdk-docs.ts rename to builder/src/builder-docs.ts index c51b8d7..e7c62c7 100644 --- a/sdk/src/sdk-docs.ts +++ b/builder/src/builder-docs.ts @@ -1,22 +1,22 @@ import llmDocs from "./llm-docs/index.js"; /** - * Gets complete SDK type definitions with import paths for LLM context. + * Gets complete Agent Builder type definitions with import paths for LLM context. * - * This function returns pre-generated SDK documentation that was bundled + * This function returns pre-generated Builder documentation that was bundled * at build time. Used by agent generators to provide complete type * information to LLMs. * - * @returns Formatted string containing all SDK type definitions with import paths + * @returns Formatted string containing all Agent Builder type definitions with import paths */ -export function getSDKDocumentation(): string { - let documentation = "# Plot SDK Type Definitions\n\n"; +export function getBuilderDocumentation(): string { + let documentation = "# Plot Agent Builder Type Definitions\n\n"; documentation += - "Complete type definitions with JSDoc documentation for all Plot SDK types.\n"; + "Complete type definitions with JSDoc documentation for all Plot Agent Builder types.\n"; documentation += "These are the source files - use the import paths shown to import types in your agent code.\n\n"; - // Format each SDK file with headers and code fences + // Format each Builder file with headers and code fences for (const [importPath, content] of Object.entries(llmDocs)) { documentation += `## ${importPath}\n\n`; documentation += "```typescript\n"; diff --git a/sdk/src/common/calendar.ts b/builder/src/common/calendar.ts similarity index 100% rename from sdk/src/common/calendar.ts rename to builder/src/common/calendar.ts diff --git a/sdk/src/index.ts b/builder/src/index.ts similarity index 67% rename from sdk/src/index.ts rename to builder/src/index.ts index bef38a5..abc78c3 100644 --- a/sdk/src/index.ts +++ b/builder/src/index.ts @@ -3,4 +3,4 @@ export * from "./plot"; export * from "./tag"; export * from "./tool"; export * from "./tools"; -export { getSDKDocumentation } from "./sdk-docs"; +export { getBuilderDocumentation } from "./builder-docs"; diff --git a/sdk/src/plot.ts b/builder/src/plot.ts similarity index 100% rename from sdk/src/plot.ts rename to builder/src/plot.ts diff --git a/sdk/src/tag.ts b/builder/src/tag.ts similarity index 100% rename from sdk/src/tag.ts rename to builder/src/tag.ts diff --git a/sdk/src/tool.ts b/builder/src/tool.ts similarity index 100% rename from sdk/src/tool.ts rename to builder/src/tool.ts diff --git a/sdk/src/tools/agents.ts b/builder/src/tools/agents.ts similarity index 100% rename from sdk/src/tools/agents.ts rename to builder/src/tools/agents.ts diff --git a/sdk/src/tools/ai.ts b/builder/src/tools/ai.ts similarity index 100% rename from sdk/src/tools/ai.ts rename to builder/src/tools/ai.ts diff --git a/sdk/src/tools/callbacks.ts b/builder/src/tools/callbacks.ts similarity index 100% rename from sdk/src/tools/callbacks.ts rename to builder/src/tools/callbacks.ts diff --git a/sdk/src/tools/index.ts b/builder/src/tools/index.ts similarity index 100% rename from sdk/src/tools/index.ts rename to builder/src/tools/index.ts diff --git a/sdk/src/tools/integrations.ts b/builder/src/tools/integrations.ts similarity index 100% rename from sdk/src/tools/integrations.ts rename to builder/src/tools/integrations.ts diff --git a/sdk/src/tools/network.ts b/builder/src/tools/network.ts similarity index 100% rename from sdk/src/tools/network.ts rename to builder/src/tools/network.ts diff --git a/sdk/src/tools/plot.ts b/builder/src/tools/plot.ts similarity index 100% rename from sdk/src/tools/plot.ts rename to builder/src/tools/plot.ts diff --git a/sdk/src/tools/store.ts b/builder/src/tools/store.ts similarity index 100% rename from sdk/src/tools/store.ts rename to builder/src/tools/store.ts diff --git a/sdk/src/tools/tasks.ts b/builder/src/tools/tasks.ts similarity index 100% rename from sdk/src/tools/tasks.ts rename to builder/src/tools/tasks.ts diff --git a/sdk/src/utils/types.ts b/builder/src/utils/types.ts similarity index 100% rename from sdk/src/utils/types.ts rename to builder/src/utils/types.ts diff --git a/sdk/tsconfig.base.json b/builder/tsconfig.base.json similarity index 100% rename from sdk/tsconfig.base.json rename to builder/tsconfig.base.json diff --git a/sdk/tsconfig.build.json b/builder/tsconfig.build.json similarity index 100% rename from sdk/tsconfig.build.json rename to builder/tsconfig.build.json diff --git a/sdk/tsconfig.cli.json b/builder/tsconfig.cli.json similarity index 100% rename from sdk/tsconfig.cli.json rename to builder/tsconfig.cli.json diff --git a/sdk/tsconfig.json b/builder/tsconfig.json similarity index 100% rename from sdk/tsconfig.json rename to builder/tsconfig.json diff --git a/sdk/typedoc.json b/builder/typedoc.json similarity index 94% rename from sdk/typedoc.json rename to builder/typedoc.json index d42fb57..1a3066d 100644 --- a/sdk/typedoc.json +++ b/builder/typedoc.json @@ -24,7 +24,7 @@ "**/llm-docs/**", "**/cli/**", "src/agents-guide.ts", - "src/sdk-docs.ts", + "src/builder-docs.ts", "prebuild.ts", "postbuild.js" ], @@ -45,7 +45,7 @@ "name": "Build Plot Agents", "includeVersion": false, "disableSources": false, - "sourceLinkTemplate": "https://github.com/plotday/plot/blob/main/sdk/{path}#L{line}", + "sourceLinkTemplate": "https://github.com/plotday/plot/blob/main/builder/{path}#L{line}", "navigation": { "includeCategories": true, "includeGroups": true @@ -87,7 +87,7 @@ "navigationLinks": { "Plot": "https://plot.day", "GitHub": "https://github.com/plotday/plot", - "NPM": "https://www.npmjs.com/package/@plotday/sdk" + "NPM": "https://www.npmjs.com/package/@plotday/agent" }, "titleLink": "/", "highlightLanguages": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1f854ff..1815858 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,9 +26,9 @@ importers: agents/chat: dependencies: - '@plotday/sdk': + '@plotday/agent': specifier: workspace:^ - version: link:../../sdk + version: link:../../builder typebox: specifier: ^1.0.35 version: 1.0.35 @@ -39,9 +39,9 @@ importers: agents/events: dependencies: - '@plotday/sdk': + '@plotday/agent': specifier: workspace:^ - version: link:../../sdk + version: link:../../builder '@plotday/tool-google-calendar': specifier: workspace:^ version: link:../../tools/google-calendar @@ -53,7 +53,7 @@ importers: specifier: ^5.9.3 version: 5.9.3 - sdk: + builder: dependencies: chalk: specifier: ^4.1.2 @@ -92,9 +92,9 @@ importers: tools/google-calendar: dependencies: - '@plotday/sdk': + '@plotday/agent': specifier: workspace:^ - version: link:../../sdk + version: link:../../builder devDependencies: typescript: specifier: ^5.9.3 @@ -102,9 +102,9 @@ importers: tools/google-contacts: dependencies: - '@plotday/sdk': + '@plotday/agent': specifier: workspace:^ - version: link:../../sdk + version: link:../../builder devDependencies: typescript: specifier: ^5.9.3 @@ -112,9 +112,9 @@ importers: tools/outlook-calendar: dependencies: - '@plotday/sdk': + '@plotday/agent': specifier: workspace:^ - version: link:../../sdk + version: link:../../builder devDependencies: typescript: specifier: ^5.9.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 98114fd..5f9e879 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,5 @@ packages: - - sdk + - builder - tools/* - agents/* diff --git a/tools/google-calendar/CHANGELOG.md b/tools/google-calendar/CHANGELOG.md index e58ee01..0250741 100644 --- a/tools/google-calendar/CHANGELOG.md +++ b/tools/google-calendar/CHANGELOG.md @@ -9,14 +9,14 @@ - BREAKING: Improved callback ergonomics and types to use functions instead of strings ([#51](https://github.com/plotday/plot/pull/51) [`02c6a1e`](https://github.com/plotday/plot/commit/02c6a1e834b9aa645f29191ed59ee5b66b70c32a)) - Update for new callback function names ([#51](https://github.com/plotday/plot/pull/51) [`49b4dc9`](https://github.com/plotday/plot/commit/49b4dc94e08906a89799903610325c5fe7ebe10b)) - Updated dependencies: -- @plotday/sdk@0.17.0 +- @plotday/agent@0.17.0 ## 0.1.10 ### Changed - Updated dependencies: -- @plotday/sdk@0.16.1 +- @plotday/agent@0.16.1 ### Fixed @@ -27,14 +27,14 @@ ### Changed - Updated dependencies: -- @plotday/sdk@0.16.0 +- @plotday/agent@0.16.0 ## 0.1.8 ### Changed - Updated dependencies: -- @plotday/sdk@0.15.0 +- @plotday/agent@0.15.0 ## 0.1.7 @@ -42,14 +42,14 @@ - Remove defunct static tool id ([#27](https://github.com/plotday/plot/pull/27) [`97b3195`](https://github.com/plotday/plot/commit/97b3195abaffb6886fda90ce511de796fbd34aac)) - Updated dependencies: -- @plotday/sdk@0.14.0 +- @plotday/agent@0.14.0 ## 0.1.6 ### Changed - Updated dependencies: -- @plotday/sdk@0.13.1 +- @plotday/agent@0.13.1 ### Fixed @@ -60,14 +60,14 @@ ### Changed - Updated dependencies: -- @plotday/sdk@0.13.0 +- @plotday/agent@0.13.0 ## 0.1.4 ### Changed - Updated dependencies: -- @plotday/sdk@0.12.0 +- @plotday/agent@0.12.0 ## 0.1.3 @@ -75,14 +75,14 @@ - improved changelog format ([#9](https://github.com/plotday/plot/pull/9) [`ceecf33`](https://github.com/plotday/plot/commit/ceecf33)) - Updated dependencies: -- @plotday/sdk@0.11.1 +- @plotday/agent@0.11.1 ## 0.1.2 ### Changed - Updated dependencies [[`1d809ec`](https://github.com/plotday/plot/commit/1d809ec778244921cda072eb3744f36e28b3c1b4)]: - - @plotday/sdk@0.11.0 + - @plotday/agent@0.11.0 ## 0.1.1 @@ -93,4 +93,4 @@ ### Changed - Updated dependencies [[`a00de4c`](https://github.com/plotday/plot/commit/a00de4c48e3ec1d6190235d1d38fd3e5d398d480), [`dce4f2f`](https://github.com/plotday/plot/commit/dce4f2ff3596bd9c73212c90a1cd49a7dac12f48)]: - - @plotday/sdk@0.10.0 + - @plotday/agent@0.10.0 diff --git a/tools/google-calendar/README.md b/tools/google-calendar/README.md index c7dcd90..64d923d 100644 --- a/tools/google-calendar/README.md +++ b/tools/google-calendar/README.md @@ -5,15 +5,15 @@ A Plot tool for syncing with Google Calendar. ## Installation ```bash -npm install @plotday/tool-google-calendar @plotday/sdk +npm install @plotday/tool-google-calendar @plotday/agent ``` ## Usage ```typescript -import { Agent, Tools } from "@plotday/sdk"; +import { Agent, Tools } from "@plotday/agent"; import { GoogleCalendar } from "@plotday/tool-google-calendar"; -import { Integrations, AuthLevel, AuthProvider } from "@plotday/sdk/tools/integrations"; +import { Integrations, AuthLevel, AuthProvider } from "@plotday/agent/tools/integrations"; export default class extends Agent { private googleCalendar: GoogleCalendar; diff --git a/tools/google-calendar/package.json b/tools/google-calendar/package.json index eab7e64..e78ae86 100644 --- a/tools/google-calendar/package.json +++ b/tools/google-calendar/package.json @@ -24,7 +24,7 @@ "clean": "rm -rf dist" }, "dependencies": { - "@plotday/sdk": "workspace:^" + "@plotday/agent": "workspace:^" }, "devDependencies": { "typescript": "^5.9.3" diff --git a/tools/google-calendar/src/google-api.ts b/tools/google-calendar/src/google-api.ts index 2c24d78..8e04630 100644 --- a/tools/google-calendar/src/google-api.ts +++ b/tools/google-calendar/src/google-api.ts @@ -1,5 +1,5 @@ -import type { Activity } from "@plotday/sdk"; -import { ActivityType } from "@plotday/sdk"; +import type { Activity } from "@plotday/agent"; +import { ActivityType } from "@plotday/agent"; export type GoogleEvent = { id: string; diff --git a/tools/google-calendar/src/google-calendar.ts b/tools/google-calendar/src/google-calendar.ts index 278391c..5e44517 100644 --- a/tools/google-calendar/src/google-calendar.ts +++ b/tools/google-calendar/src/google-calendar.ts @@ -4,20 +4,20 @@ import { type NewActivity, Tool, type ToolBuilder, -} from "@plotday/sdk"; +} from "@plotday/agent"; import { type Calendar, type CalendarAuth, type CalendarTool, -} from "@plotday/sdk/common/calendar"; -import { type Callback } from "@plotday/sdk/tools/callbacks"; +} from "@plotday/agent/common/calendar"; +import { type Callback } from "@plotday/agent/tools/callbacks"; import { AuthLevel, AuthProvider, type Authorization, Integrations, -} from "@plotday/sdk/tools/integrations"; -import { Network, type WebhookRequest } from "@plotday/sdk/tools/network"; +} from "@plotday/agent/tools/integrations"; +import { Network, type WebhookRequest } from "@plotday/agent/tools/network"; import { GoogleApi, diff --git a/tools/google-calendar/tsconfig.json b/tools/google-calendar/tsconfig.json index 14c8a2b..47e94ca 100644 --- a/tools/google-calendar/tsconfig.json +++ b/tools/google-calendar/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "@plotday/sdk/tsconfig.base.json", + "extends": "@plotday/agent/tsconfig.base.json", "include": ["src/**/*.ts"] } diff --git a/tools/google-contacts/CHANGELOG.md b/tools/google-contacts/CHANGELOG.md index bee57e1..94a2f29 100644 --- a/tools/google-contacts/CHANGELOG.md +++ b/tools/google-contacts/CHANGELOG.md @@ -9,14 +9,14 @@ - BREAKING: Improved callback ergonomics and types to use functions instead of strings ([#51](https://github.com/plotday/plot/pull/51) [`02c6a1e`](https://github.com/plotday/plot/commit/02c6a1e834b9aa645f29191ed59ee5b66b70c32a)) - Update for new callback function names ([#51](https://github.com/plotday/plot/pull/51) [`49b4dc9`](https://github.com/plotday/plot/commit/49b4dc94e08906a89799903610325c5fe7ebe10b)) - Updated dependencies: -- @plotday/sdk@0.17.0 +- @plotday/agent@0.17.0 ## 0.1.10 ### Changed - Updated dependencies: -- @plotday/sdk@0.16.1 +- @plotday/agent@0.16.1 ### Fixed @@ -27,28 +27,28 @@ ### Changed - Updated dependencies: -- @plotday/sdk@0.16.0 +- @plotday/agent@0.16.0 ## 0.1.8 ### Changed - Updated dependencies: -- @plotday/sdk@0.15.0 +- @plotday/agent@0.15.0 ## 0.1.7 ### Changed - Updated dependencies: -- @plotday/sdk@0.14.0 +- @plotday/agent@0.14.0 ## 0.1.6 ### Changed - Updated dependencies: -- @plotday/sdk@0.13.1 +- @plotday/agent@0.13.1 ### Fixed @@ -59,14 +59,14 @@ ### Changed - Updated dependencies: -- @plotday/sdk@0.13.0 +- @plotday/agent@0.13.0 ## 0.1.4 ### Changed - Updated dependencies: -- @plotday/sdk@0.12.0 +- @plotday/agent@0.12.0 ## 0.1.3 @@ -74,14 +74,14 @@ - improved changelog format ([#9](https://github.com/plotday/plot/pull/9) [`ceecf33`](https://github.com/plotday/plot/commit/ceecf33)) - Updated dependencies: -- @plotday/sdk@0.11.1 +- @plotday/agent@0.11.1 ## 0.1.2 ### Changed - Updated dependencies [[`1d809ec`](https://github.com/plotday/plot/commit/1d809ec778244921cda072eb3744f36e28b3c1b4)]: - - @plotday/sdk@0.11.0 + - @plotday/agent@0.11.0 ## 0.1.1 @@ -92,4 +92,4 @@ ### Changed - Updated dependencies [[`a00de4c`](https://github.com/plotday/plot/commit/a00de4c48e3ec1d6190235d1d38fd3e5d398d480), [`dce4f2f`](https://github.com/plotday/plot/commit/dce4f2ff3596bd9c73212c90a1cd49a7dac12f48)]: - - @plotday/sdk@0.10.0 + - @plotday/agent@0.10.0 diff --git a/tools/google-contacts/README.md b/tools/google-contacts/README.md index 33b5552..8ef1c16 100644 --- a/tools/google-contacts/README.md +++ b/tools/google-contacts/README.md @@ -5,15 +5,15 @@ A Plot tool for syncing with Google Contacts. ## Installation ```bash -npm install @plotday/tool-google-contacts @plotday/sdk +npm install @plotday/tool-google-contacts @plotday/agent ``` ## Usage ```typescript -import { Agent, Tools } from "@plotday/sdk"; +import { Agent, Tools } from "@plotday/agent"; import { GoogleContacts } from "@plotday/tool-google-contacts"; -import { Integrations, AuthLevel, AuthProvider } from "@plotday/sdk/tools/integrations"; +import { Integrations, AuthLevel, AuthProvider } from "@plotday/agent/tools/integrations"; export default class extends Agent { private googleContacts: GoogleContacts; diff --git a/tools/google-contacts/package.json b/tools/google-contacts/package.json index 90583ce..41cd7e0 100644 --- a/tools/google-contacts/package.json +++ b/tools/google-contacts/package.json @@ -24,7 +24,7 @@ "clean": "rm -rf dist" }, "dependencies": { - "@plotday/sdk": "workspace:^" + "@plotday/agent": "workspace:^" }, "devDependencies": { "typescript": "^5.9.3" diff --git a/tools/google-contacts/src/google-contacts.ts b/tools/google-contacts/src/google-contacts.ts index e53c978..4c0167c 100644 --- a/tools/google-contacts/src/google-contacts.ts +++ b/tools/google-contacts/src/google-contacts.ts @@ -1,12 +1,12 @@ -import { Tool, type ToolBuilder } from "@plotday/sdk"; -import { type Callback } from "@plotday/sdk/tools/callbacks"; +import { Tool, type ToolBuilder } from "@plotday/agent"; +import { type Callback } from "@plotday/agent/tools/callbacks"; import { AuthLevel, AuthProvider, type AuthToken, type Authorization, Integrations, -} from "@plotday/sdk/tools/integrations"; +} from "@plotday/agent/tools/integrations"; import type { Contact, diff --git a/tools/google-contacts/src/types.ts b/tools/google-contacts/src/types.ts index 4545ad5..33fddec 100644 --- a/tools/google-contacts/src/types.ts +++ b/tools/google-contacts/src/types.ts @@ -1,4 +1,4 @@ -import type { ActivityLink, ITool } from "@plotday/sdk"; +import type { ActivityLink, ITool } from "@plotday/agent"; export type Contact = { email: string; diff --git a/tools/google-contacts/tsconfig.json b/tools/google-contacts/tsconfig.json index 14c8a2b..47e94ca 100644 --- a/tools/google-contacts/tsconfig.json +++ b/tools/google-contacts/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "@plotday/sdk/tsconfig.base.json", + "extends": "@plotday/agent/tsconfig.base.json", "include": ["src/**/*.ts"] } diff --git a/tools/outlook-calendar/CHANGELOG.md b/tools/outlook-calendar/CHANGELOG.md index 76b320f..cbdbea4 100644 --- a/tools/outlook-calendar/CHANGELOG.md +++ b/tools/outlook-calendar/CHANGELOG.md @@ -9,14 +9,14 @@ - BREAKING: Improved callback ergonomics and types to use functions instead of strings ([#51](https://github.com/plotday/plot/pull/51) [`02c6a1e`](https://github.com/plotday/plot/commit/02c6a1e834b9aa645f29191ed59ee5b66b70c32a)) - Update for new callback function names ([#51](https://github.com/plotday/plot/pull/51) [`49b4dc9`](https://github.com/plotday/plot/commit/49b4dc94e08906a89799903610325c5fe7ebe10b)) - Updated dependencies: -- @plotday/sdk@0.17.0 +- @plotday/agent@0.17.0 ## 0.1.10 ### Changed - Updated dependencies: -- @plotday/sdk@0.16.1 +- @plotday/agent@0.16.1 ### Fixed @@ -27,14 +27,14 @@ ### Changed - Updated dependencies: -- @plotday/sdk@0.16.0 +- @plotday/agent@0.16.0 ## 0.1.8 ### Changed - Updated dependencies: -- @plotday/sdk@0.15.0 +- @plotday/agent@0.15.0 ## 0.1.7 @@ -42,14 +42,14 @@ - Remove defunct static tool id ([#27](https://github.com/plotday/plot/pull/27) [`97b3195`](https://github.com/plotday/plot/commit/97b3195abaffb6886fda90ce511de796fbd34aac)) - Updated dependencies: -- @plotday/sdk@0.14.0 +- @plotday/agent@0.14.0 ## 0.1.6 ### Changed - Updated dependencies: -- @plotday/sdk@0.13.1 +- @plotday/agent@0.13.1 ### Fixed @@ -60,14 +60,14 @@ ### Changed - Updated dependencies: -- @plotday/sdk@0.13.0 +- @plotday/agent@0.13.0 ## 0.1.4 ### Changed - Updated dependencies: -- @plotday/sdk@0.12.0 +- @plotday/agent@0.12.0 ## 0.1.3 @@ -75,14 +75,14 @@ - improved changelog format ([#9](https://github.com/plotday/plot/pull/9) [`ceecf33`](https://github.com/plotday/plot/commit/ceecf33)) - Updated dependencies: -- @plotday/sdk@0.11.1 +- @plotday/agent@0.11.1 ## 0.1.2 ### Changed - Updated dependencies [[`1d809ec`](https://github.com/plotday/plot/commit/1d809ec778244921cda072eb3744f36e28b3c1b4)]: - - @plotday/sdk@0.11.0 + - @plotday/agent@0.11.0 ## 0.1.1 @@ -93,4 +93,4 @@ ### Changed - Updated dependencies [[`a00de4c`](https://github.com/plotday/plot/commit/a00de4c48e3ec1d6190235d1d38fd3e5d398d480), [`dce4f2f`](https://github.com/plotday/plot/commit/dce4f2ff3596bd9c73212c90a1cd49a7dac12f48)]: - - @plotday/sdk@0.10.0 + - @plotday/agent@0.10.0 diff --git a/tools/outlook-calendar/README.md b/tools/outlook-calendar/README.md index 77d2d68..c0b0906 100644 --- a/tools/outlook-calendar/README.md +++ b/tools/outlook-calendar/README.md @@ -5,15 +5,15 @@ A Plot tool for syncing with Microsoft Outlook Calendar (Microsoft 365). ## Installation ```bash -npm install @plotday/tool-outlook-calendar @plotday/sdk +npm install @plotday/tool-outlook-calendar @plotday/agent ``` ## Usage ```typescript -import { Agent, Tools } from "@plotday/sdk"; +import { Agent, Tools } from "@plotday/agent"; import { OutlookCalendar } from "@plotday/tool-outlook-calendar"; -import { Integrations, AuthLevel, AuthProvider } from "@plotday/sdk/tools/integrations"; +import { Integrations, AuthLevel, AuthProvider } from "@plotday/agent/tools/integrations"; export default class extends Agent { private outlookCalendar: OutlookCalendar; diff --git a/tools/outlook-calendar/package.json b/tools/outlook-calendar/package.json index efd446b..11fd39f 100644 --- a/tools/outlook-calendar/package.json +++ b/tools/outlook-calendar/package.json @@ -24,7 +24,7 @@ "clean": "rm -rf dist" }, "dependencies": { - "@plotday/sdk": "workspace:^" + "@plotday/agent": "workspace:^" }, "devDependencies": { "typescript": "^5.9.3" diff --git a/tools/outlook-calendar/src/outlook-calendar.ts b/tools/outlook-calendar/src/outlook-calendar.ts index 3b60936..8286ded 100644 --- a/tools/outlook-calendar/src/outlook-calendar.ts +++ b/tools/outlook-calendar/src/outlook-calendar.ts @@ -5,20 +5,20 @@ import { type NewActivity, Tool, type ToolBuilder, -} from "@plotday/sdk"; +} from "@plotday/agent"; import type { Calendar, CalendarAuth, CalendarTool, -} from "@plotday/sdk/common/calendar"; -import { type Callback } from "@plotday/sdk/tools/callbacks"; +} from "@plotday/agent/common/calendar"; +import { type Callback } from "@plotday/agent/tools/callbacks"; import { AuthLevel, AuthProvider, type Authorization, Integrations, -} from "@plotday/sdk/tools/integrations"; -import { Network, type WebhookRequest } from "@plotday/sdk/tools/network"; +} from "@plotday/agent/tools/integrations"; +import { Network, type WebhookRequest } from "@plotday/agent/tools/network"; // Import types from the existing outlook.ts file type CalendarConfig = { diff --git a/tools/outlook-calendar/tsconfig.json b/tools/outlook-calendar/tsconfig.json index 14c8a2b..47e94ca 100644 --- a/tools/outlook-calendar/tsconfig.json +++ b/tools/outlook-calendar/tsconfig.json @@ -1,5 +1,5 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "@plotday/sdk/tsconfig.base.json", + "extends": "@plotday/agent/tsconfig.base.json", "include": ["src/**/*.ts"] }