Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@syncagent/js

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncagent/js - npm Package Compare versions

Comparing version
0.2.1
to
0.2.2
+16
-0
dist/index.d.mts

@@ -23,2 +23,17 @@ interface ToolParameter {

baseUrl?: string;
/**
* Mandatory query filter applied to EVERY database operation.
* Use this for multi-tenant SaaS apps to scope the agent to the current user's data.
*
* @example
* // MongoDB — scope to current organization
* filter: { organizationId: currentUser.orgId }
*
* // SQL — scope to current tenant
* filter: { tenant_id: currentUser.tenantId }
*
* // Multiple fields
* filter: { org_id: org.id, deleted: false }
*/
filter?: Record<string, any>;
}

@@ -69,2 +84,3 @@ interface Message {

private tools;
private filter;
constructor(config: SyncAgentConfig);

@@ -71,0 +87,0 @@ private headers;

@@ -23,2 +23,17 @@ interface ToolParameter {

baseUrl?: string;
/**
* Mandatory query filter applied to EVERY database operation.
* Use this for multi-tenant SaaS apps to scope the agent to the current user's data.
*
* @example
* // MongoDB — scope to current organization
* filter: { organizationId: currentUser.orgId }
*
* // SQL — scope to current tenant
* filter: { tenant_id: currentUser.tenantId }
*
* // Multiple fields
* filter: { org_id: org.id, deleted: false }
*/
filter?: Record<string, any>;
}

@@ -69,2 +84,3 @@ interface Message {

private tools;
private filter;
constructor(config: SyncAgentConfig);

@@ -71,0 +87,0 @@ private headers;

+3
-2

@@ -75,3 +75,2 @@ "use strict";

// src/client.ts
var SYNCAGENT_API_URL = "https://syncagentdev.vercel.app";
var SyncAgentClient = class {

@@ -82,5 +81,6 @@ constructor(config) {

this.apiKey = config.apiKey;
this.baseUrl = (config.baseUrl || SYNCAGENT_API_URL).replace(/\/$/, "");
this.baseUrl = (config.baseUrl || "https://syncagent.dev").replace(/\/$/, "");
this.connectionString = config.connectionString;
this.tools = config.tools || {};
this.filter = config.filter || {};
}

@@ -140,2 +140,3 @@ headers() {

connectionString: this.connectionString,
...this.filter && Object.keys(this.filter).length > 0 && { filter: this.filter },
...clientTools && { clientTools }

@@ -142,0 +143,0 @@ }),

@@ -49,3 +49,2 @@ // src/stream.ts

// src/client.ts
var SYNCAGENT_API_URL = "https://syncagentdev.vercel.app";
var SyncAgentClient = class {

@@ -56,5 +55,6 @@ constructor(config) {

this.apiKey = config.apiKey;
this.baseUrl = (config.baseUrl || SYNCAGENT_API_URL).replace(/\/$/, "");
this.baseUrl = (config.baseUrl || "https://syncagent.dev").replace(/\/$/, "");
this.connectionString = config.connectionString;
this.tools = config.tools || {};
this.filter = config.filter || {};
}

@@ -114,2 +114,3 @@ headers() {

connectionString: this.connectionString,
...this.filter && Object.keys(this.filter).length > 0 && { filter: this.filter },
...clientTools && { clientTools }

@@ -116,0 +117,0 @@ }),

+1
-1
{
"name": "@syncagent/js",
"version": "0.2.1",
"version": "0.2.2",
"description": "SyncAgent JavaScript SDK — AI database agent for any app",

@@ -5,0 +5,0 @@ "main": "./dist/index.cjs",