veryfront 0.0.47 → 0.0.48
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/index.js +11 -5
- package/dist/ai/index.js.map +2 -2
- package/dist/cli.js +269 -69
- package/dist/components.js +1 -1
- package/dist/components.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/data.js +1 -1
- package/dist/data.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +2 -2
- package/dist/integrations/_base/files/app/api/auth/status/route.ts +30 -0
- package/dist/integrations/_base/files/app/components/ServiceConnections.tsx +153 -0
- package/dist/integrations/_base/files/lib/token-store.ts +5 -1
- package/dist/integrations/calendar/connector.json +7 -1
- package/dist/integrations/calendar/files/_env.example +29 -0
- package/dist/integrations/calendar/files/ai/tools/create-event.ts +2 -6
- package/dist/integrations/calendar/files/ai/tools/find-free-time.ts +2 -6
- package/dist/integrations/calendar/files/ai/tools/list-events.ts +2 -6
- package/dist/integrations/calendar/files/lib/token-store.ts +5 -1
- package/dist/integrations/github/files/ai/tools/create-issue.ts +2 -6
- package/dist/integrations/github/files/ai/tools/get-pr-diff.ts +2 -6
- package/dist/integrations/github/files/ai/tools/list-prs.ts +2 -6
- package/dist/integrations/github/files/ai/tools/list-repos.ts +2 -6
- package/dist/integrations/github/files/lib/token-store.ts +5 -1
- package/dist/integrations/gmail/connector.json +7 -1
- package/dist/integrations/gmail/files/_env.example +29 -0
- package/dist/integrations/gmail/files/ai/tools/list-emails.ts +2 -6
- package/dist/integrations/gmail/files/ai/tools/search-emails.ts +2 -6
- package/dist/integrations/gmail/files/ai/tools/send-email.ts +2 -6
- package/dist/integrations/gmail/files/lib/token-store.ts +5 -1
- package/dist/integrations/slack/files/ai/tools/get-messages.ts +2 -6
- package/dist/integrations/slack/files/ai/tools/list-channels.ts +2 -6
- package/dist/integrations/slack/files/ai/tools/send-message.ts +2 -6
- package/dist/integrations/slack/files/lib/token-store.ts +5 -1
- package/dist/templates/ai/app/api/chat/route.ts +8 -1
- package/dist/templates/ai/app/page.tsx +3 -2
- package/package.json +1 -1
package/dist/ai/index.js
CHANGED
|
@@ -1675,7 +1675,7 @@ var LRU_DEFAULT_MAX_SIZE_BYTES = 50 * 1024 * 1024;
|
|
|
1675
1675
|
// deno.json
|
|
1676
1676
|
var deno_default = {
|
|
1677
1677
|
name: "veryfront",
|
|
1678
|
-
version: "0.0.
|
|
1678
|
+
version: "0.0.48",
|
|
1679
1679
|
exclude: [
|
|
1680
1680
|
"npm/",
|
|
1681
1681
|
"dist/",
|
|
@@ -2497,7 +2497,7 @@ var AgentRuntime = class {
|
|
|
2497
2497
|
* Stream a response
|
|
2498
2498
|
* Returns a ReadableStream compatible with Vercel AI SDK Data Stream Protocol
|
|
2499
2499
|
*/
|
|
2500
|
-
async stream(messages,
|
|
2500
|
+
async stream(messages, context, callbacks) {
|
|
2501
2501
|
for (const msg of messages) {
|
|
2502
2502
|
await this.memory.add(msg);
|
|
2503
2503
|
}
|
|
@@ -2506,6 +2506,10 @@ var AgentRuntime = class {
|
|
|
2506
2506
|
const { provider, model } = getProviderFromModel(this.config.model);
|
|
2507
2507
|
const encoder = new TextEncoder();
|
|
2508
2508
|
const messageId = `msg_${Date.now()}`;
|
|
2509
|
+
const toolContext = {
|
|
2510
|
+
agentId: this.id,
|
|
2511
|
+
...context
|
|
2512
|
+
};
|
|
2509
2513
|
return new ReadableStream({
|
|
2510
2514
|
start: async (controller) => {
|
|
2511
2515
|
try {
|
|
@@ -2525,7 +2529,8 @@ var AgentRuntime = class {
|
|
|
2525
2529
|
controller,
|
|
2526
2530
|
encoder,
|
|
2527
2531
|
callbacks,
|
|
2528
|
-
messageId
|
|
2532
|
+
messageId,
|
|
2533
|
+
toolContext
|
|
2529
2534
|
);
|
|
2530
2535
|
const finishEvent = JSON.stringify({
|
|
2531
2536
|
type: "finish",
|
|
@@ -2697,7 +2702,7 @@ var AgentRuntime = class {
|
|
|
2697
2702
|
* Execute agent loop with streaming
|
|
2698
2703
|
* Uses Vercel AI SDK Data Stream Protocol format
|
|
2699
2704
|
*/
|
|
2700
|
-
async executeAgentLoopStreaming(provider, model, systemPrompt, messages, controller, encoder, callbacks, _messageId) {
|
|
2705
|
+
async executeAgentLoopStreaming(provider, model, systemPrompt, messages, controller, encoder, callbacks, _messageId, toolContext) {
|
|
2701
2706
|
const capabilities = getPlatformCapabilities();
|
|
2702
2707
|
const maxSteps = this.getMaxSteps(capabilities.maxAgentSteps);
|
|
2703
2708
|
const toolCalls = [];
|
|
@@ -2942,7 +2947,8 @@ var AgentRuntime = class {
|
|
|
2942
2947
|
|
|
2943
2948
|
`));
|
|
2944
2949
|
const result = await executeTool(tc.name, toolCall.args, {
|
|
2945
|
-
agentId: this.id
|
|
2950
|
+
agentId: this.id,
|
|
2951
|
+
...toolContext
|
|
2946
2952
|
});
|
|
2947
2953
|
toolCall.status = "completed";
|
|
2948
2954
|
toolCall.result = result;
|