New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

agents-sdk

Package Overview
Dependencies
Maintainers
0
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agents-sdk - npm Package Compare versions

Comparing version 0.0.0-7149fd2 to 0.0.0-bd8366d

dist/chunk-X3UUTPNL.js

2

dist/ai-chat-agent.js
import {
Agent
} from "./chunk-W5RYZQM4.js";
} from "./chunk-X3UUTPNL.js";

@@ -5,0 +5,0 @@ // src/ai-chat-agent.ts

@@ -43,4 +43,4 @@ import { Server, Connection, PartyServerOptions } from "partyserver";

when: Date | string | number,
callback: string,
payload: T
callback: keyof this,
payload?: T
): Promise<Schedule<T>>;

@@ -47,0 +47,0 @@ getSchedule<T = string>(id: string): Promise<Schedule<T> | undefined>;

@@ -7,3 +7,3 @@ import {

routeAgentRequest
} from "./chunk-W5RYZQM4.js";
} from "./chunk-X3UUTPNL.js";
export {

@@ -10,0 +10,0 @@ Agent,

{
"name": "agents-sdk",
"version": "0.0.0-7149fd2",
"version": "0.0.0-bd8366d",
"main": "src/index.ts",

@@ -5,0 +5,0 @@ "type": "module",

@@ -189,7 +189,15 @@ import {

when: Date | string | number,
callback: string,
payload: T
callback: keyof this,
payload?: T
): Promise<Schedule<T>> {
const id = nanoid(9);
if (typeof callback !== "string") {
throw new Error("Callback must be a string");
}
if (typeof this[callback] !== "function") {
throw new Error(`this.${callback} is not a function`);
}
if (when instanceof Date) {

@@ -208,4 +216,4 @@ const timestamp = Math.floor(when.getTime() / 1000);

id,
callback,
payload,
callback: callback,
payload: payload as T,
time: timestamp,

@@ -229,4 +237,4 @@ type: "scheduled",

id,
callback,
payload,
callback: callback,
payload: payload as T,
delayInSeconds: when,

@@ -251,4 +259,4 @@ time: timestamp,

id,
callback,
payload,
callback: callback,
payload: payload as T,
cron: when,

@@ -255,0 +263,0 @@ time: timestamp,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc