commune-ai 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/README.md +36 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -36,14 +36,8 @@ pnpm add commune-ai
36
36
  2. Sign up and create an organization
37
37
  3. Go to **Domains** → Click **"Add Domain"**
38
38
  4. Enter a subdomain (e.g., `agent.yourcompany.com`)
39
- 5. Click **"Create"** - DNS records will be shown
40
- 6. Add these DNS records to your DNS provider:
41
- ```
42
- Type: MX Name: agent Value: feedback-smtp.us-east-1.amazonses.com Priority: 10
43
- Type: CNAME Name: _dmarc.agent Value: _dmarc.agent.yourcompany.com
44
- Type: TXT Name: agent Value: v=spf1 include:amazonses.com ~all
45
- Type: TXT Name: _dmarc.agent Value: v=DMARC1; p=quarantine; rua=mailto:dmarc@yourcompany.com
46
- ```
39
+ 5. Click **"Create"** - The dashboard will show DNS records to add
40
+ 6. Add the DNS records shown in the dashboard to your DNS provider
47
41
  7. Click **"Verify"** in the dashboard (wait 5-10 minutes for DNS propagation)
48
42
 
49
43
  ### 2. Create Inbox
@@ -226,11 +220,44 @@ const searchResults = await client.search({
226
220
  });
227
221
 
228
222
  console.log(`Found ${searchResults.length} relevant emails`);
229
- for (const result of searchResults) {
223
+ ```
224
+
225
+ ---
226
+
227
+ ## Semantic Search (Coming Soon)
228
+
229
+ Search across all emails in your organization using natural language queries.
230
+
231
+ ```ts
232
+ import { CommuneClient } from "commune-ai";
233
+
234
+ const client = new CommuneClient({
235
+ apiKey: process.env.COMMUNE_API_KEY,
236
+ });
237
+
238
+ // Find emails similar to a query
239
+ const results = await client.search({
240
+ query: "What were the pricing questions from last week?",
241
+ limit: 10,
242
+ threshold: 0.7, // Similarity threshold 0-1
243
+ before: "2024-12-31", // Only search recent emails
244
+ sender: "customer@example.com", // Filter by sender (optional)
245
+ });
246
+
247
+ console.log(`Found ${results.length} relevant emails:`);
248
+ for (const result of results) {
230
249
  console.log(`Match (${result.similarity.toFixed(2)}): ${result.message.content}`);
250
+ console.log(`Highlights: ${result.highlights.join(", ")}`);
231
251
  }
232
252
  ```
233
253
 
254
+ **What you get:**
255
+ - **Natural language queries** - Search like "pricing issues from enterprise customers"
256
+ - **Similarity scores** - Ranked results by relevance (0-1)
257
+ - **Highlighted matches** - Text snippets showing why the email matched
258
+ - **Filtering options** - By date range, sender, or other criteria
259
+ - **Fast results** - AI-powered semantic matching
260
+
234
261
  ---
235
262
 
236
263
  ## Complete agent example
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commune-ai",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Email infrastructure for AI agents - webhooks, threads, history, and semantic search",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",