agents 0.0.1 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +418 -18
- package/dist/ai-chat-agent.d.ts +38 -0
- package/dist/ai-chat-agent.js +169 -0
- package/dist/ai-chat-agent.js.map +1 -0
- package/dist/ai-react.d.ts +86 -0
- package/dist/ai-react.js +189 -0
- package/dist/ai-react.js.map +1 -0
- package/dist/ai-types.d.ts +69 -0
- package/dist/ai-types.js +1 -0
- package/dist/ai-types.js.map +1 -0
- package/dist/chunk-HMLY7DHA.js +16 -0
- package/dist/chunk-HMLY7DHA.js.map +1 -0
- package/dist/chunk-PDF5WEP4.js +542 -0
- package/dist/chunk-PDF5WEP4.js.map +1 -0
- package/dist/client.d.ts +84 -0
- package/dist/client.js +138 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +306 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/react.d.ts +39 -0
- package/dist/react.js +97 -0
- package/dist/react.js.map +1 -0
- package/dist/schedule.d.ts +53 -0
- package/dist/schedule.js +73 -0
- package/dist/schedule.js.map +1 -0
- package/package.json +57 -19
- package/src/index.ts +852 -0
- package/.npmignore +0 -1
- package/allagents.xml +0 -22170
- package/node-user-agents.js +0 -31
package/dist/react.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import "./chunk-HMLY7DHA.js";
|
|
2
|
+
|
|
3
|
+
// src/react.tsx
|
|
4
|
+
import { usePartySocket } from "partysocket/react";
|
|
5
|
+
import { useCallback, useRef } from "react";
|
|
6
|
+
function useAgent(options) {
|
|
7
|
+
const pendingCallsRef = useRef(
|
|
8
|
+
/* @__PURE__ */ new Map()
|
|
9
|
+
);
|
|
10
|
+
const call = useCallback(
|
|
11
|
+
(method, args = [], streamOptions) => {
|
|
12
|
+
return new Promise((resolve, reject) => {
|
|
13
|
+
const id = Math.random().toString(36).slice(2);
|
|
14
|
+
pendingCallsRef.current.set(id, {
|
|
15
|
+
resolve,
|
|
16
|
+
reject,
|
|
17
|
+
stream: streamOptions
|
|
18
|
+
});
|
|
19
|
+
const request = {
|
|
20
|
+
type: "rpc",
|
|
21
|
+
id,
|
|
22
|
+
method,
|
|
23
|
+
args
|
|
24
|
+
};
|
|
25
|
+
agent.send(JSON.stringify(request));
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
[]
|
|
29
|
+
);
|
|
30
|
+
const agent = usePartySocket({
|
|
31
|
+
prefix: "agents",
|
|
32
|
+
party: options.agent,
|
|
33
|
+
room: options.name || "default",
|
|
34
|
+
...options,
|
|
35
|
+
onMessage: (message) => {
|
|
36
|
+
if (typeof message.data === "string") {
|
|
37
|
+
let parsedMessage;
|
|
38
|
+
try {
|
|
39
|
+
parsedMessage = JSON.parse(message.data);
|
|
40
|
+
} catch (error) {
|
|
41
|
+
return options.onMessage?.(message);
|
|
42
|
+
}
|
|
43
|
+
if (parsedMessage.type === "cf_agent_state") {
|
|
44
|
+
options.onStateUpdate?.(parsedMessage.state, "server");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (parsedMessage.type === "rpc") {
|
|
48
|
+
const response = parsedMessage;
|
|
49
|
+
const pending = pendingCallsRef.current.get(response.id);
|
|
50
|
+
if (!pending) return;
|
|
51
|
+
if (!response.success) {
|
|
52
|
+
pending.reject(new Error(response.error));
|
|
53
|
+
pendingCallsRef.current.delete(response.id);
|
|
54
|
+
pending.stream?.onError?.(response.error);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if ("done" in response) {
|
|
58
|
+
if (response.done) {
|
|
59
|
+
pending.resolve(response.result);
|
|
60
|
+
pendingCallsRef.current.delete(response.id);
|
|
61
|
+
pending.stream?.onDone?.(response.result);
|
|
62
|
+
} else {
|
|
63
|
+
pending.stream?.onChunk?.(response.result);
|
|
64
|
+
}
|
|
65
|
+
} else {
|
|
66
|
+
pending.resolve(response.result);
|
|
67
|
+
pendingCallsRef.current.delete(response.id);
|
|
68
|
+
}
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
options.onMessage?.(message);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
agent.setState = (state) => {
|
|
76
|
+
agent.send(JSON.stringify({ type: "cf_agent_state", state }));
|
|
77
|
+
options.onStateUpdate?.(state, "client");
|
|
78
|
+
};
|
|
79
|
+
agent.call = call;
|
|
80
|
+
agent.agent = options.agent;
|
|
81
|
+
agent.name = options.name || "default";
|
|
82
|
+
if (agent.agent !== agent.agent.toLowerCase()) {
|
|
83
|
+
console.warn(
|
|
84
|
+
`Agent name: ${agent.agent} should probably be in lowercase. Received: ${agent.agent}`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
if (agent.name !== agent.name.toLowerCase()) {
|
|
88
|
+
console.warn(
|
|
89
|
+
`Agent instance name: ${agent.name} should probably be in lowercase. Received: ${agent.name}`
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
return agent;
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
useAgent
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react.tsx"],"sourcesContent":["import type { PartySocket } from \"partysocket\";\nimport { usePartySocket } from \"partysocket/react\";\nimport { useCallback, useRef } from \"react\";\nimport type { RPCRequest, RPCResponse } from \"./\";\nimport type { StreamOptions } from \"./client\";\n\n/**\n * Options for the useAgent hook\n * @template State Type of the Agent's state\n */\nexport type UseAgentOptions<State = unknown> = Omit<\n Parameters<typeof usePartySocket>[0],\n \"party\" | \"room\"\n> & {\n /** Name of the agent to connect to */\n agent: string;\n /** Name of the specific Agent instance */\n name?: string;\n /** Called when the Agent's state is updated */\n onStateUpdate?: (state: State, source: \"server\" | \"client\") => void;\n};\n\n/**\n * React hook for connecting to an Agent\n * @template State Type of the Agent's state\n * @param options Connection options\n * @returns WebSocket connection with setState and call methods\n */\nexport function useAgent<State = unknown>(\n options: UseAgentOptions<State>\n): PartySocket & {\n agent: string;\n name: string;\n setState: (state: State) => void;\n call: <T = unknown>(\n method: string,\n args?: unknown[],\n streamOptions?: StreamOptions\n ) => Promise<T>;\n} {\n // Keep track of pending RPC calls\n const pendingCallsRef = useRef(\n new Map<\n string,\n {\n resolve: (value: unknown) => void;\n reject: (error: Error) => void;\n stream?: StreamOptions;\n }\n >()\n );\n\n // Create the call method\n const call = useCallback(\n <T = unknown,>(\n method: string,\n args: unknown[] = [],\n streamOptions?: StreamOptions\n ): Promise<T> => {\n return new Promise((resolve, reject) => {\n const id = Math.random().toString(36).slice(2);\n pendingCallsRef.current.set(id, {\n resolve: resolve as (value: unknown) => void,\n reject,\n stream: streamOptions,\n });\n\n const request: RPCRequest = {\n type: \"rpc\",\n id,\n method,\n args,\n };\n\n agent.send(JSON.stringify(request));\n });\n },\n []\n );\n\n const agent = usePartySocket({\n prefix: \"agents\",\n party: options.agent,\n room: options.name || \"default\",\n ...options,\n onMessage: (message) => {\n if (typeof message.data === \"string\") {\n let parsedMessage: Record<string, unknown>;\n try {\n parsedMessage = JSON.parse(message.data);\n } catch (error) {\n // silently ignore invalid messages for now\n // TODO: log errors with log levels\n return options.onMessage?.(message);\n }\n if (parsedMessage.type === \"cf_agent_state\") {\n options.onStateUpdate?.(parsedMessage.state as State, \"server\");\n return;\n }\n if (parsedMessage.type === \"rpc\") {\n const response = parsedMessage as RPCResponse;\n const pending = pendingCallsRef.current.get(response.id);\n if (!pending) return;\n\n if (!response.success) {\n pending.reject(new Error(response.error));\n pendingCallsRef.current.delete(response.id);\n pending.stream?.onError?.(response.error);\n return;\n }\n\n // Handle streaming responses\n if (\"done\" in response) {\n if (response.done) {\n pending.resolve(response.result);\n pendingCallsRef.current.delete(response.id);\n pending.stream?.onDone?.(response.result);\n } else {\n pending.stream?.onChunk?.(response.result);\n }\n } else {\n // Non-streaming response\n pending.resolve(response.result);\n pendingCallsRef.current.delete(response.id);\n }\n return;\n }\n }\n options.onMessage?.(message);\n },\n }) as PartySocket & {\n agent: string;\n name: string;\n setState: (state: State) => void;\n call: <T = unknown>(\n method: string,\n args?: unknown[],\n streamOptions?: StreamOptions\n ) => Promise<T>;\n };\n\n agent.setState = (state: State) => {\n agent.send(JSON.stringify({ type: \"cf_agent_state\", state }));\n options.onStateUpdate?.(state, \"client\");\n };\n\n agent.call = call;\n agent.agent = options.agent;\n agent.name = options.name || \"default\";\n\n // warn if agent or name isn't in lowercase\n if (agent.agent !== agent.agent.toLowerCase()) {\n console.warn(\n `Agent name: ${agent.agent} should probably be in lowercase. Received: ${agent.agent}`\n );\n }\n if (agent.name !== agent.name.toLowerCase()) {\n console.warn(\n `Agent instance name: ${agent.name} should probably be in lowercase. Received: ${agent.name}`\n );\n }\n\n return agent;\n}\n"],"mappings":";;;AACA,SAAS,sBAAsB;AAC/B,SAAS,aAAa,cAAc;AA0B7B,SAAS,SACd,SAUA;AAEA,QAAM,kBAAkB;AAAA,IACtB,oBAAI,IAOF;AAAA,EACJ;AAGA,QAAM,OAAO;AAAA,IACX,CACE,QACA,OAAkB,CAAC,GACnB,kBACe;AACf,aAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,cAAM,KAAK,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC;AAC7C,wBAAgB,QAAQ,IAAI,IAAI;AAAA,UAC9B;AAAA,UACA;AAAA,UACA,QAAQ;AAAA,QACV,CAAC;AAED,cAAM,UAAsB;AAAA,UAC1B,MAAM;AAAA,UACN;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAEA,cAAM,KAAK,KAAK,UAAU,OAAO,CAAC;AAAA,MACpC,CAAC;AAAA,IACH;AAAA,IACA,CAAC;AAAA,EACH;AAEA,QAAM,QAAQ,eAAe;AAAA,IAC3B,QAAQ;AAAA,IACR,OAAO,QAAQ;AAAA,IACf,MAAM,QAAQ,QAAQ;AAAA,IACtB,GAAG;AAAA,IACH,WAAW,CAAC,YAAY;AACtB,UAAI,OAAO,QAAQ,SAAS,UAAU;AACpC,YAAI;AACJ,YAAI;AACF,0BAAgB,KAAK,MAAM,QAAQ,IAAI;AAAA,QACzC,SAAS,OAAO;AAGd,iBAAO,QAAQ,YAAY,OAAO;AAAA,QACpC;AACA,YAAI,cAAc,SAAS,kBAAkB;AAC3C,kBAAQ,gBAAgB,cAAc,OAAgB,QAAQ;AAC9D;AAAA,QACF;AACA,YAAI,cAAc,SAAS,OAAO;AAChC,gBAAM,WAAW;AACjB,gBAAM,UAAU,gBAAgB,QAAQ,IAAI,SAAS,EAAE;AACvD,cAAI,CAAC,QAAS;AAEd,cAAI,CAAC,SAAS,SAAS;AACrB,oBAAQ,OAAO,IAAI,MAAM,SAAS,KAAK,CAAC;AACxC,4BAAgB,QAAQ,OAAO,SAAS,EAAE;AAC1C,oBAAQ,QAAQ,UAAU,SAAS,KAAK;AACxC;AAAA,UACF;AAGA,cAAI,UAAU,UAAU;AACtB,gBAAI,SAAS,MAAM;AACjB,sBAAQ,QAAQ,SAAS,MAAM;AAC/B,8BAAgB,QAAQ,OAAO,SAAS,EAAE;AAC1C,sBAAQ,QAAQ,SAAS,SAAS,MAAM;AAAA,YAC1C,OAAO;AACL,sBAAQ,QAAQ,UAAU,SAAS,MAAM;AAAA,YAC3C;AAAA,UACF,OAAO;AAEL,oBAAQ,QAAQ,SAAS,MAAM;AAC/B,4BAAgB,QAAQ,OAAO,SAAS,EAAE;AAAA,UAC5C;AACA;AAAA,QACF;AAAA,MACF;AACA,cAAQ,YAAY,OAAO;AAAA,IAC7B;AAAA,EACF,CAAC;AAWD,QAAM,WAAW,CAAC,UAAiB;AACjC,UAAM,KAAK,KAAK,UAAU,EAAE,MAAM,kBAAkB,MAAM,CAAC,CAAC;AAC5D,YAAQ,gBAAgB,OAAO,QAAQ;AAAA,EACzC;AAEA,QAAM,OAAO;AACb,QAAM,QAAQ,QAAQ;AACtB,QAAM,OAAO,QAAQ,QAAQ;AAG7B,MAAI,MAAM,UAAU,MAAM,MAAM,YAAY,GAAG;AAC7C,YAAQ;AAAA,MACN,eAAe,MAAM,KAAK,+CAA+C,MAAM,KAAK;AAAA,IACtF;AAAA,EACF;AACA,MAAI,MAAM,SAAS,MAAM,KAAK,YAAY,GAAG;AAC3C,YAAQ;AAAA,MACN,wBAAwB,MAAM,IAAI,+CAA+C,MAAM,IAAI;AAAA,IAC7F;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
type Schedule = z.infer<typeof unstable_scheduleSchema>;
|
|
4
|
+
declare function unstable_getSchedulePrompt(event: { date: Date }): string;
|
|
5
|
+
declare const unstable_scheduleSchema: z.ZodObject<
|
|
6
|
+
{
|
|
7
|
+
description: z.ZodString;
|
|
8
|
+
when: z.ZodObject<
|
|
9
|
+
{
|
|
10
|
+
type: z.ZodEnum<["scheduled", "delayed", "cron", "no-schedule"]>;
|
|
11
|
+
date: z.ZodOptional<z.ZodDate>;
|
|
12
|
+
delayInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
cron: z.ZodOptional<z.ZodString>;
|
|
14
|
+
},
|
|
15
|
+
"strip",
|
|
16
|
+
z.ZodTypeAny,
|
|
17
|
+
{
|
|
18
|
+
type: "scheduled" | "delayed" | "cron" | "no-schedule";
|
|
19
|
+
cron?: string | undefined;
|
|
20
|
+
delayInSeconds?: number | undefined;
|
|
21
|
+
date?: Date | undefined;
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
type: "scheduled" | "delayed" | "cron" | "no-schedule";
|
|
25
|
+
cron?: string | undefined;
|
|
26
|
+
delayInSeconds?: number | undefined;
|
|
27
|
+
date?: Date | undefined;
|
|
28
|
+
}
|
|
29
|
+
>;
|
|
30
|
+
},
|
|
31
|
+
"strip",
|
|
32
|
+
z.ZodTypeAny,
|
|
33
|
+
{
|
|
34
|
+
description: string;
|
|
35
|
+
when: {
|
|
36
|
+
type: "scheduled" | "delayed" | "cron" | "no-schedule";
|
|
37
|
+
cron?: string | undefined;
|
|
38
|
+
delayInSeconds?: number | undefined;
|
|
39
|
+
date?: Date | undefined;
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
description: string;
|
|
44
|
+
when: {
|
|
45
|
+
type: "scheduled" | "delayed" | "cron" | "no-schedule";
|
|
46
|
+
cron?: string | undefined;
|
|
47
|
+
delayInSeconds?: number | undefined;
|
|
48
|
+
date?: Date | undefined;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
>;
|
|
52
|
+
|
|
53
|
+
export { type Schedule, unstable_getSchedulePrompt, unstable_scheduleSchema };
|
package/dist/schedule.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import "./chunk-HMLY7DHA.js";
|
|
2
|
+
|
|
3
|
+
// src/schedule.ts
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
function unstable_getSchedulePrompt(event) {
|
|
6
|
+
return `
|
|
7
|
+
[Schedule Parser Component]
|
|
8
|
+
|
|
9
|
+
Current time: ${event.date.toUTCString()}
|
|
10
|
+
|
|
11
|
+
This component parses natural language scheduling requests into a structured format. It extracts:
|
|
12
|
+
1. A clean task description (without timing information)
|
|
13
|
+
2. Scheduling details in one of these formats:
|
|
14
|
+
- scheduled: Specific date/time events
|
|
15
|
+
- delayed: Relative time delays (in seconds)
|
|
16
|
+
- cron: Recurring patterns
|
|
17
|
+
- no-schedule: Tasks without timing
|
|
18
|
+
|
|
19
|
+
Rules:
|
|
20
|
+
- Task descriptions should be clean and focused on the action
|
|
21
|
+
- Use numbers (0-6) for days in cron patterns (0=Sunday)
|
|
22
|
+
- For recurring tasks, use standard cron syntax
|
|
23
|
+
- For relative times, convert to seconds
|
|
24
|
+
- For specific dates, use the current time as reference
|
|
25
|
+
|
|
26
|
+
Example outputs:
|
|
27
|
+
{
|
|
28
|
+
"description": "meeting with team",
|
|
29
|
+
"when": {
|
|
30
|
+
"type": "scheduled",
|
|
31
|
+
"date": "tomorrow at 14:00"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
{
|
|
36
|
+
"description": "backup database",
|
|
37
|
+
"when": {
|
|
38
|
+
"type": "cron",
|
|
39
|
+
"cron": "0 0 * * *"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
{
|
|
44
|
+
"description": "send report",
|
|
45
|
+
"when": {
|
|
46
|
+
"type": "delayed",
|
|
47
|
+
"delayInSeconds": 1800
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[End Schedule Parser Component]
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
var unstable_scheduleSchema = z.object({
|
|
55
|
+
description: z.string().describe("A description of the task"),
|
|
56
|
+
when: z.object({
|
|
57
|
+
type: z.enum(["scheduled", "delayed", "cron", "no-schedule"]).describe("The type of scheduling details"),
|
|
58
|
+
date: z.coerce.date().optional().describe(
|
|
59
|
+
"execute task at the specified date and time (only use if the type is scheduled)"
|
|
60
|
+
),
|
|
61
|
+
delayInSeconds: z.number().optional().describe(
|
|
62
|
+
"execute task after a delay in seconds (only use if the type is delayed)"
|
|
63
|
+
),
|
|
64
|
+
cron: z.string().optional().describe(
|
|
65
|
+
"execute task on a recurring interval specified as cron syntax (only use if the type is cron)"
|
|
66
|
+
)
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
export {
|
|
70
|
+
unstable_getSchedulePrompt,
|
|
71
|
+
unstable_scheduleSchema
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=schedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schedule.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport type Schedule = z.infer<typeof unstable_scheduleSchema>;\n\nexport function unstable_getSchedulePrompt(event: { date: Date }) {\n return `\n[Schedule Parser Component]\n\nCurrent time: ${event.date.toUTCString()}\n\nThis component parses natural language scheduling requests into a structured format. It extracts:\n1. A clean task description (without timing information)\n2. Scheduling details in one of these formats:\n - scheduled: Specific date/time events\n - delayed: Relative time delays (in seconds)\n - cron: Recurring patterns\n - no-schedule: Tasks without timing\n\nRules:\n- Task descriptions should be clean and focused on the action\n- Use numbers (0-6) for days in cron patterns (0=Sunday)\n- For recurring tasks, use standard cron syntax\n- For relative times, convert to seconds\n- For specific dates, use the current time as reference\n\nExample outputs:\n{\n \"description\": \"meeting with team\",\n \"when\": {\n \"type\": \"scheduled\",\n \"date\": \"tomorrow at 14:00\"\n }\n}\n\n{\n \"description\": \"backup database\",\n \"when\": {\n \"type\": \"cron\",\n \"cron\": \"0 0 * * *\"\n }\n}\n\n{\n \"description\": \"send report\",\n \"when\": {\n \"type\": \"delayed\",\n \"delayInSeconds\": 1800\n }\n}\n\n[End Schedule Parser Component]\n`;\n}\n\nexport const unstable_scheduleSchema = z.object({\n description: z.string().describe(\"A description of the task\"),\n when: z.object({\n type: z\n .enum([\"scheduled\", \"delayed\", \"cron\", \"no-schedule\"])\n .describe(\"The type of scheduling details\"),\n date: z.coerce\n .date()\n .optional()\n .describe(\n \"execute task at the specified date and time (only use if the type is scheduled)\"\n ),\n delayInSeconds: z\n .number()\n .optional()\n .describe(\n \"execute task after a delay in seconds (only use if the type is delayed)\"\n ),\n cron: z\n .string()\n .optional()\n .describe(\n \"execute task on a recurring interval specified as cron syntax (only use if the type is cron)\"\n ),\n }),\n});\n"],"mappings":";;;AAAA,SAAS,SAAS;AAIX,SAAS,2BAA2B,OAAuB;AAChE,SAAO;AAAA;AAAA;AAAA,gBAGO,MAAM,KAAK,YAAY,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CxC;AAEO,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,aAAa,EAAE,OAAO,EAAE,SAAS,2BAA2B;AAAA,EAC5D,MAAM,EAAE,OAAO;AAAA,IACb,MAAM,EACH,KAAK,CAAC,aAAa,WAAW,QAAQ,aAAa,CAAC,EACpD,SAAS,gCAAgC;AAAA,IAC5C,MAAM,EAAE,OACL,KAAK,EACL,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,IACF,gBAAgB,EACb,OAAO,EACP,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,IACF,MAAM,EACH,OAAO,EACP,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,EACJ,CAAC;AACH,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,27 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"fs": "*",
|
|
8
|
-
"xml2js": "*"
|
|
9
|
-
},
|
|
10
|
-
"engine": "node >= 0.6.6",
|
|
11
|
-
"main": "node-user-agents.js",
|
|
12
|
-
"devDependencies": {},
|
|
3
|
+
"version": "0.0.37",
|
|
4
|
+
"main": "src/index.ts",
|
|
5
|
+
"type": "module",
|
|
13
6
|
"scripts": {
|
|
14
|
-
"test": "
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"evals": "(cd evals; evalite)",
|
|
9
|
+
"build": "tsx ./scripts/build.ts"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"require": "./dist/index.js",
|
|
19
|
+
"import": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./client": {
|
|
22
|
+
"types": "./dist/client.d.ts",
|
|
23
|
+
"require": "./dist/client.js",
|
|
24
|
+
"import": "./dist/client.js"
|
|
25
|
+
},
|
|
26
|
+
"./react": {
|
|
27
|
+
"types": "./dist/react.d.ts",
|
|
28
|
+
"require": "./dist/react.js",
|
|
29
|
+
"import": "./dist/react.js"
|
|
30
|
+
},
|
|
31
|
+
"./ai-react": {
|
|
32
|
+
"types": "./dist/ai-react.d.ts",
|
|
33
|
+
"require": "./dist/ai-react.js",
|
|
34
|
+
"import": "./dist/ai-react.js"
|
|
35
|
+
},
|
|
36
|
+
"./ai-chat-agent": {
|
|
37
|
+
"types": "./dist/ai-chat-agent.d.ts",
|
|
38
|
+
"require": "./dist/ai-chat-agent.js",
|
|
39
|
+
"import": "./dist/ai-chat-agent.js"
|
|
40
|
+
},
|
|
41
|
+
"./schedule": {
|
|
42
|
+
"types": "./dist/schedule.d.ts",
|
|
43
|
+
"require": "./dist/schedule.js",
|
|
44
|
+
"import": "./dist/schedule.js"
|
|
45
|
+
}
|
|
15
46
|
},
|
|
47
|
+
"keywords": [],
|
|
16
48
|
"repository": {
|
|
17
49
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/
|
|
50
|
+
"url": "git+https://github.com/cloudflare/agents.git",
|
|
51
|
+
"directory": "packages/agents"
|
|
19
52
|
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://github.com/cloudflare/agents/issues"
|
|
55
|
+
},
|
|
56
|
+
"author": "Cloudflare Inc.",
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"description": "A home for your AI agents",
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"cron-schedule": "^5.0.4",
|
|
61
|
+
"nanoid": "^5.1.3",
|
|
62
|
+
"partyserver": "^0.0.65",
|
|
63
|
+
"partysocket": "0.0.0-548c226"
|
|
64
|
+
}
|
|
27
65
|
}
|