agents 0.0.0-c3e8618 → 0.0.0-cebd0de
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/dist/ai-chat-agent.d.ts +28 -23
- package/dist/ai-chat-agent.js +168 -0
- package/dist/ai-chat-agent.js.map +1 -0
- package/dist/ai-react.d.ts +72 -44
- package/dist/ai-react.js +196 -0
- package/dist/ai-react.js.map +1 -0
- package/dist/ai-types.d.ts +60 -40
- 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-YMUU7QHV.js +595 -0
- package/dist/chunk-YMUU7QHV.js.map +1 -0
- package/dist/client.d.ts +57 -37
- package/dist/client.js +131 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +223 -174
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/client.d.ts +59 -20
- package/dist/mcp/client.js +471 -0
- package/dist/mcp/client.js.map +1 -0
- package/dist/mcp/index.d.ts +8 -5
- package/dist/mcp/index.js +340 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/react.d.ts +24 -15
- package/dist/react.js +104 -0
- package/dist/react.js.map +1 -0
- package/dist/schedule.d.ts +30 -20
- package/dist/schedule.js +73 -0
- package/dist/schedule.js.map +1 -0
- package/package.json +7 -4
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-cebd0de",
|
|
4
4
|
"main": "src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -52,6 +52,11 @@
|
|
|
52
52
|
"types": "./dist/mcp/client.d.ts",
|
|
53
53
|
"require": "./dist/mcp/client.js",
|
|
54
54
|
"import": "./dist/mcp/client.js"
|
|
55
|
+
},
|
|
56
|
+
"./mcp/do-oauth-client-provider": {
|
|
57
|
+
"types": "./dist/mcp/do-oauth-client-provider.d.ts",
|
|
58
|
+
"require": "./dist/mcp/do-oauth-client-provider.js",
|
|
59
|
+
"import": "./dist/mcp/do-oauth-client-provider.js"
|
|
55
60
|
}
|
|
56
61
|
},
|
|
57
62
|
"keywords": [],
|
|
@@ -67,12 +72,10 @@
|
|
|
67
72
|
"license": "MIT",
|
|
68
73
|
"description": "A home for your AI agents",
|
|
69
74
|
"dependencies": {
|
|
75
|
+
"@modelcontextprotocol/sdk": "^1.8.0",
|
|
70
76
|
"cron-schedule": "^5.0.4",
|
|
71
77
|
"nanoid": "^5.1.5",
|
|
72
78
|
"partyserver": "^0.0.66",
|
|
73
79
|
"partysocket": "1.1.3"
|
|
74
|
-
},
|
|
75
|
-
"devDependencies": {
|
|
76
|
-
"@modelcontextprotocol/sdk": "^1.8.0"
|
|
77
80
|
}
|
|
78
81
|
}
|