Skip to content

Commit 578fcaf

Browse files
committed
docs: add READMEs for local-file-search, zip-files, send-file-to-channel, trulia-search
1 parent 66e30b5 commit 578fcaf

File tree

4 files changed

+242
-0
lines changed

4 files changed

+242
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Trulia Property Search
2+
3+
Search real estate properties on Trulia by location, price, bedrooms, and property type.
4+
5+
## Installation
6+
7+
```bash
8+
npm install @framers/agentos-ext-trulia-search
9+
```
10+
11+
## Usage
12+
13+
```typescript
14+
import { createExtensionPack } from '@framers/agentos-ext-trulia-search';
15+
16+
const pack = createExtensionPack({
17+
config: {
18+
truliaRapidApiKey: process.env.TRULIA_RAPIDAPI_KEY,
19+
firecrawlApiKey: process.env.FIRECRAWL_API_KEY, // fallback
20+
},
21+
});
22+
```
23+
24+
## Tool: `trulia_search`
25+
26+
| Parameter | Type | Required | Description |
27+
|-----------|------|----------|-------------|
28+
| `location` | string | Yes | City, state or zip code (e.g., "Austin, TX") |
29+
| `propertyType` | string | No | house, apartment, condo, townhouse, land |
30+
| `minPrice` | number | No | Minimum price filter |
31+
| `maxPrice` | number | No | Maximum price filter |
32+
| `bedrooms` | number | No | Minimum bedrooms |
33+
| `bathrooms` | number | No | Minimum bathrooms |
34+
| `maxResults` | number | No | Maximum results (default: 20) |
35+
36+
### Example
37+
38+
```
39+
User: "Find 3-bedroom houses in Austin under $400k"
40+
Tool call: trulia_search({
41+
location: "Austin, TX",
42+
propertyType: "house",
43+
bedrooms: 3,
44+
maxPrice: 400000
45+
})
46+
```
47+
48+
## Data Sources
49+
50+
1. **RapidAPI Trulia** (preferred) — structured property data via `TRULIA_RAPIDAPI_KEY`
51+
2. **Firecrawl scrape** (fallback) — scrapes trulia.com search results when no RapidAPI key is available. Requires `FIRECRAWL_API_KEY`.
52+
53+
## Environment Variables
54+
55+
| Variable | Required | Description |
56+
|----------|----------|-------------|
57+
| `TRULIA_RAPIDAPI_KEY` | No | RapidAPI key for structured Trulia data |
58+
| `FIRECRAWL_API_KEY` | No | Firecrawl key for scrape fallback |
59+
60+
At least one key is needed for results. Without either, the tool returns empty listings.
61+
62+
## License
63+
64+
MIT
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Local File Search
2+
3+
Search for files on the local filesystem by fuzzy name matching.
4+
5+
## Installation
6+
7+
```bash
8+
npm install @framers/agentos-ext-local-file-search
9+
```
10+
11+
## Usage
12+
13+
```typescript
14+
import { createExtensionPack } from '@framers/agentos-ext-local-file-search';
15+
16+
const pack = createExtensionPack({
17+
config: {
18+
denylist: ['/proc', '/sys', 'node_modules', '.git', '.ssh', '*.key'],
19+
maxResults: 10,
20+
maxDepth: 10,
21+
timeoutMs: 10000,
22+
},
23+
});
24+
```
25+
26+
## Tool: `local_file_search`
27+
28+
| Parameter | Type | Required | Description |
29+
|-----------|------|----------|-------------|
30+
| `query` | string | Yes | Filename or partial filename to search for |
31+
| `directory` | string | No | Specific directory to search (defaults to full filesystem) |
32+
33+
### Example
34+
35+
```
36+
User: "Find pic.png in my Downloads folder"
37+
Tool call: local_file_search({ query: "pic.png", directory: "/Users/me/Downloads" })
38+
Result: [{ path: "/Users/me/Downloads/pic.png", size: 2100000, mimeType: "image/png" }]
39+
```
40+
41+
## Relevance Ranking
42+
43+
Results are ranked by match quality:
44+
45+
| Match Type | Score | Example |
46+
|-----------|-------|---------|
47+
| Exact match | 1.0 | `pic.png` matches `pic.png` |
48+
| Without extension | 0.95 | `pic` matches `pic.png` |
49+
| Starts with | 0.8 | `pic` matches `picture.jpg` |
50+
| Contains | 0.6 | `report` matches `quarterly-report.pdf` |
51+
| Fuzzy (Levenshtein ≤ 3) | 0.06-0.30 | `rprt` matches `report` |
52+
53+
## Denylist
54+
55+
The denylist filters both directories and files:
56+
57+
- **Directory patterns**: `/proc`, `/sys`, `node_modules`, `.git`, `.ssh`
58+
- **Glob patterns**: `*.key`, `*.pem`, `*.secret`
59+
60+
Configurable via `agent.config.json`:
61+
62+
```json
63+
{
64+
"fileSearch": {
65+
"denylist": ["/proc", "/sys", "node_modules", ".git", ".ssh", "*.key"],
66+
"maxResults": 10
67+
}
68+
}
69+
```
70+
71+
## License
72+
73+
MIT
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Send File to Channel
2+
3+
Send a local file to the user via the current chat channel (Telegram, WhatsApp, Discord, Slack).
4+
5+
## Installation
6+
7+
```bash
8+
npm install @framers/agentos-ext-send-file-to-channel
9+
```
10+
11+
## Usage
12+
13+
```typescript
14+
import { createExtensionPack } from '@framers/agentos-ext-send-file-to-channel';
15+
16+
const pack = createExtensionPack();
17+
```
18+
19+
## Tool: `send_file_to_channel`
20+
21+
| Parameter | Type | Required | Description |
22+
|-----------|------|----------|-------------|
23+
| `filePath` | string | Yes | Absolute path to the file to send |
24+
| `caption` | string | No | Message to accompany the file |
25+
26+
### Example
27+
28+
```
29+
User: "Send me pic.png from my Downloads"
30+
Tool calls:
31+
1. local_file_search({ query: "pic.png" })
32+
2. send_file_to_channel({ filePath: "/Users/me/Downloads/pic.png", caption: "Here's your file!" })
33+
```
34+
35+
## Platform File Size Limits
36+
37+
| Platform | Limit |
38+
|----------|-------|
39+
| Telegram | 50 MB |
40+
| WhatsApp (Cloud API) | 100 MB |
41+
| WhatsApp (Twilio) | 16 MB |
42+
| Discord | 25 MB |
43+
| Slack | 1 GB |
44+
45+
When a file exceeds the platform limit, the tool returns an error suggesting compression:
46+
47+
> "File is 60.0MB but telegram limit is 50MB. Would you like me to compress it first?"
48+
49+
## Channel Context
50+
51+
This tool requires a `ChannelContext` to be injected by the `ChatTaskResponder`. It only works when invoked via a messaging channel — not in CLI or API mode.
52+
53+
## License
54+
55+
MIT
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Zip Files
2+
3+
Create zip archives from local files for sharing via chat channels.
4+
5+
## Installation
6+
7+
```bash
8+
npm install @framers/agentos-ext-zip-files
9+
```
10+
11+
## Usage
12+
13+
```typescript
14+
import { createExtensionPack } from '@framers/agentos-ext-zip-files';
15+
16+
const pack = createExtensionPack();
17+
```
18+
19+
## Tool: `zip_files`
20+
21+
| Parameter | Type | Required | Description |
22+
|-----------|------|----------|-------------|
23+
| `files` | string[] | Yes | Array of absolute file paths to include |
24+
| `outputName` | string | No | Name for the zip (without `.zip` extension) |
25+
26+
### Example
27+
28+
```
29+
User: "Zip up my report files and send them to me"
30+
Tool calls:
31+
1. local_file_search({ query: "report" })
32+
2. zip_files({ files: ["/path/report.pdf", "/path/report-data.csv"], outputName: "reports" })
33+
3. send_file_to_channel({ filePath: "/tmp/wunderland-zips/reports.zip" })
34+
```
35+
36+
## Behavior
37+
38+
- Output directory: `/tmp/wunderland-zips/`
39+
- Compression: zlib level 6 (balanced speed/size)
40+
- Max total input size: 500 MB
41+
- Auto-cleanup: zips older than 1 hour are deleted on each invocation
42+
- Validates all input paths exist before creating the archive
43+
44+
## Dependencies
45+
46+
- `archiver` (npm) for cross-platform zip creation
47+
48+
## License
49+
50+
MIT

0 commit comments

Comments
 (0)