agent-toolbelt 0.2.0 → 0.2.1
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/README.md +6 -1
- package/dist/index.d.mts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/dist/langchain.js +14 -0
- package/dist/langchain.mjs +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Official SDK for [Agent Toolbelt](https://agent-toolbelt-production.up.railway.app) — a suite of focused API tools for AI agents and developers.
|
|
4
4
|
|
|
5
|
-
**Typed client + LangChain tool wrappers** for schema generation, text extraction, token counting, CSV conversion, Markdown conversion, URL metadata, regex building, cron expressions, address normalization,
|
|
5
|
+
**Typed client + LangChain tool wrappers** for schema generation, text extraction, token counting, CSV conversion, Markdown conversion, URL metadata, regex building, cron expressions, address normalization, color palette generation, and brand kit creation.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -118,6 +118,9 @@ await client.addressNormalizer({ address: "123 main st apt 4b, springfield, il 6
|
|
|
118
118
|
|
|
119
119
|
// Generate color palettes from descriptions or hex colors
|
|
120
120
|
await client.colorPalette({ description: "calm fintech blue", count: 5 });
|
|
121
|
+
|
|
122
|
+
// Generate a full brand kit — colors, typography, CSS/Tailwind tokens
|
|
123
|
+
await client.brandKit({ name: "Solaris Health", industry: "healthcare", vibe: ["modern", "trustworthy"], format: "full" });
|
|
121
124
|
```
|
|
122
125
|
|
|
123
126
|
---
|
|
@@ -159,6 +162,7 @@ const result = await agent.invoke({
|
|
|
159
162
|
| `build_cron` | Convert schedule descriptions to cron expressions |
|
|
160
163
|
| `normalize_address` | Normalize US addresses to USPS format |
|
|
161
164
|
| `generate_color_palette` | Generate color palettes with WCAG scores and CSS variables |
|
|
165
|
+
| `generate_brand_kit` | Generate full brand kit — colors, typography, CSS/Tailwind tokens |
|
|
162
166
|
|
|
163
167
|
---
|
|
164
168
|
|
|
@@ -176,6 +180,7 @@ const result = await agent.invoke({
|
|
|
176
180
|
| `cron-builder` | $0.0005 / call |
|
|
177
181
|
| `address-normalizer` | $0.0005 / call |
|
|
178
182
|
| `color-palette` | $0.0005 / call |
|
|
183
|
+
| `brand-kit` | $0.001 / call |
|
|
179
184
|
|
|
180
185
|
## License
|
|
181
186
|
|
package/dist/index.d.mts
CHANGED
|
@@ -185,6 +185,30 @@ interface BrandKitResult {
|
|
|
185
185
|
googleFontsUrl?: string;
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
+
interface ImageMetadataStripperResult {
|
|
189
|
+
image: string;
|
|
190
|
+
outputFormat: string;
|
|
191
|
+
original: {
|
|
192
|
+
sizeBytes: number;
|
|
193
|
+
format?: string;
|
|
194
|
+
width?: number;
|
|
195
|
+
height?: number;
|
|
196
|
+
channels?: number;
|
|
197
|
+
hasExif?: boolean;
|
|
198
|
+
hasIcc?: boolean;
|
|
199
|
+
hasIptc?: boolean;
|
|
200
|
+
hasXmp?: boolean;
|
|
201
|
+
orientation?: number;
|
|
202
|
+
density?: number;
|
|
203
|
+
};
|
|
204
|
+
output: {
|
|
205
|
+
sizeBytes: number;
|
|
206
|
+
reductionBytes: number;
|
|
207
|
+
reductionPercent: number;
|
|
208
|
+
};
|
|
209
|
+
metadataStripped: boolean;
|
|
210
|
+
strippedFields: string[];
|
|
211
|
+
}
|
|
188
212
|
declare class AgentToolbelt {
|
|
189
213
|
private apiKey;
|
|
190
214
|
private baseUrl;
|
|
@@ -255,6 +279,12 @@ declare class AgentToolbelt {
|
|
|
255
279
|
format?: "hex" | "rgb" | "hsl" | "all";
|
|
256
280
|
includeShades?: boolean;
|
|
257
281
|
}): Promise<ColorPaletteResult>;
|
|
282
|
+
/** Strip EXIF, GPS, ICC, IPTC, and XMP metadata from a base64-encoded image */
|
|
283
|
+
imageMetadataStripper(input: {
|
|
284
|
+
image: string;
|
|
285
|
+
format?: "jpeg" | "png" | "webp" | "preserve";
|
|
286
|
+
quality?: number;
|
|
287
|
+
}): Promise<ImageMetadataStripperResult>;
|
|
258
288
|
/** Generate a full brand kit — color palette, typography, CSS/Tailwind tokens */
|
|
259
289
|
brandKit(input: {
|
|
260
290
|
name: string;
|
|
@@ -265,4 +295,4 @@ declare class AgentToolbelt {
|
|
|
265
295
|
}): Promise<BrandKitResult>;
|
|
266
296
|
}
|
|
267
297
|
|
|
268
|
-
export { type AddressNormalizerResult, AgentToolbelt, type AgentToolbeltOptions, type BrandKitResult, type ColorPaletteResult, type CronBuilderResult, type CsvToJsonResult, type MarkdownConverterResult, type RegexBuilderResult, type SchemaGeneratorResult, type TextExtractorResult, type TokenCountResult, type UrlMetadataResult };
|
|
298
|
+
export { type AddressNormalizerResult, AgentToolbelt, type AgentToolbeltOptions, type BrandKitResult, type ColorPaletteResult, type CronBuilderResult, type CsvToJsonResult, type ImageMetadataStripperResult, type MarkdownConverterResult, type RegexBuilderResult, type SchemaGeneratorResult, type TextExtractorResult, type TokenCountResult, type UrlMetadataResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -185,6 +185,30 @@ interface BrandKitResult {
|
|
|
185
185
|
googleFontsUrl?: string;
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
+
interface ImageMetadataStripperResult {
|
|
189
|
+
image: string;
|
|
190
|
+
outputFormat: string;
|
|
191
|
+
original: {
|
|
192
|
+
sizeBytes: number;
|
|
193
|
+
format?: string;
|
|
194
|
+
width?: number;
|
|
195
|
+
height?: number;
|
|
196
|
+
channels?: number;
|
|
197
|
+
hasExif?: boolean;
|
|
198
|
+
hasIcc?: boolean;
|
|
199
|
+
hasIptc?: boolean;
|
|
200
|
+
hasXmp?: boolean;
|
|
201
|
+
orientation?: number;
|
|
202
|
+
density?: number;
|
|
203
|
+
};
|
|
204
|
+
output: {
|
|
205
|
+
sizeBytes: number;
|
|
206
|
+
reductionBytes: number;
|
|
207
|
+
reductionPercent: number;
|
|
208
|
+
};
|
|
209
|
+
metadataStripped: boolean;
|
|
210
|
+
strippedFields: string[];
|
|
211
|
+
}
|
|
188
212
|
declare class AgentToolbelt {
|
|
189
213
|
private apiKey;
|
|
190
214
|
private baseUrl;
|
|
@@ -255,6 +279,12 @@ declare class AgentToolbelt {
|
|
|
255
279
|
format?: "hex" | "rgb" | "hsl" | "all";
|
|
256
280
|
includeShades?: boolean;
|
|
257
281
|
}): Promise<ColorPaletteResult>;
|
|
282
|
+
/** Strip EXIF, GPS, ICC, IPTC, and XMP metadata from a base64-encoded image */
|
|
283
|
+
imageMetadataStripper(input: {
|
|
284
|
+
image: string;
|
|
285
|
+
format?: "jpeg" | "png" | "webp" | "preserve";
|
|
286
|
+
quality?: number;
|
|
287
|
+
}): Promise<ImageMetadataStripperResult>;
|
|
258
288
|
/** Generate a full brand kit — color palette, typography, CSS/Tailwind tokens */
|
|
259
289
|
brandKit(input: {
|
|
260
290
|
name: string;
|
|
@@ -265,4 +295,4 @@ declare class AgentToolbelt {
|
|
|
265
295
|
}): Promise<BrandKitResult>;
|
|
266
296
|
}
|
|
267
297
|
|
|
268
|
-
export { type AddressNormalizerResult, AgentToolbelt, type AgentToolbeltOptions, type BrandKitResult, type ColorPaletteResult, type CronBuilderResult, type CsvToJsonResult, type MarkdownConverterResult, type RegexBuilderResult, type SchemaGeneratorResult, type TextExtractorResult, type TokenCountResult, type UrlMetadataResult };
|
|
298
|
+
export { type AddressNormalizerResult, AgentToolbelt, type AgentToolbeltOptions, type BrandKitResult, type ColorPaletteResult, type CronBuilderResult, type CsvToJsonResult, type ImageMetadataStripperResult, type MarkdownConverterResult, type RegexBuilderResult, type SchemaGeneratorResult, type TextExtractorResult, type TokenCountResult, type UrlMetadataResult };
|
package/dist/index.js
CHANGED
|
@@ -90,6 +90,10 @@ var AgentToolbelt = class {
|
|
|
90
90
|
colorPalette(input) {
|
|
91
91
|
return this.call("color-palette", input);
|
|
92
92
|
}
|
|
93
|
+
/** Strip EXIF, GPS, ICC, IPTC, and XMP metadata from a base64-encoded image */
|
|
94
|
+
imageMetadataStripper(input) {
|
|
95
|
+
return this.call("image-metadata-stripper", input);
|
|
96
|
+
}
|
|
93
97
|
/** Generate a full brand kit — color palette, typography, CSS/Tailwind tokens */
|
|
94
98
|
brandKit(input) {
|
|
95
99
|
return this.call("brand-kit", input);
|
package/dist/index.mjs
CHANGED
|
@@ -64,6 +64,10 @@ var AgentToolbelt = class {
|
|
|
64
64
|
colorPalette(input) {
|
|
65
65
|
return this.call("color-palette", input);
|
|
66
66
|
}
|
|
67
|
+
/** Strip EXIF, GPS, ICC, IPTC, and XMP metadata from a base64-encoded image */
|
|
68
|
+
imageMetadataStripper(input) {
|
|
69
|
+
return this.call("image-metadata-stripper", input);
|
|
70
|
+
}
|
|
67
71
|
/** Generate a full brand kit — color palette, typography, CSS/Tailwind tokens */
|
|
68
72
|
brandKit(input) {
|
|
69
73
|
return this.call("brand-kit", input);
|
package/dist/langchain.js
CHANGED
|
@@ -165,6 +165,20 @@ function createLangChainTools(client) {
|
|
|
165
165
|
return JSON.stringify(result);
|
|
166
166
|
}
|
|
167
167
|
}),
|
|
168
|
+
// ---- Image Metadata Stripper ----
|
|
169
|
+
new import_tools.DynamicStructuredTool({
|
|
170
|
+
name: "strip_image_metadata",
|
|
171
|
+
description: "Strip EXIF, GPS location, IPTC, XMP, and ICC metadata from an image for privacy protection. Use this before uploading or sharing images to remove sensitive embedded data like GPS coordinates, camera model, timestamps, copyright notices, and editing history. Accepts base64-encoded JPEG, PNG, WebP, or TIFF images. Returns the cleaned image as base64 along with a report of what was removed and the file size reduction.",
|
|
172
|
+
schema: import_zod.z.object({
|
|
173
|
+
image: import_zod.z.string().describe("Base64-encoded image data (JPEG, PNG, WebP, or TIFF). Do not include the data URI prefix."),
|
|
174
|
+
format: import_zod.z.enum(["jpeg", "png", "webp", "preserve"]).default("preserve").describe("Output format. 'preserve' keeps the original format."),
|
|
175
|
+
quality: import_zod.z.number().int().min(1).max(100).default(90).describe("Output quality for lossy formats (1-100)")
|
|
176
|
+
}),
|
|
177
|
+
func: async ({ image, format, quality }) => {
|
|
178
|
+
const result = await client.imageMetadataStripper({ image, format, quality });
|
|
179
|
+
return JSON.stringify(result);
|
|
180
|
+
}
|
|
181
|
+
}),
|
|
168
182
|
// ---- Brand Kit ----
|
|
169
183
|
new import_tools.DynamicStructuredTool({
|
|
170
184
|
name: "generate_brand_kit",
|
package/dist/langchain.mjs
CHANGED
|
@@ -141,6 +141,20 @@ function createLangChainTools(client) {
|
|
|
141
141
|
return JSON.stringify(result);
|
|
142
142
|
}
|
|
143
143
|
}),
|
|
144
|
+
// ---- Image Metadata Stripper ----
|
|
145
|
+
new DynamicStructuredTool({
|
|
146
|
+
name: "strip_image_metadata",
|
|
147
|
+
description: "Strip EXIF, GPS location, IPTC, XMP, and ICC metadata from an image for privacy protection. Use this before uploading or sharing images to remove sensitive embedded data like GPS coordinates, camera model, timestamps, copyright notices, and editing history. Accepts base64-encoded JPEG, PNG, WebP, or TIFF images. Returns the cleaned image as base64 along with a report of what was removed and the file size reduction.",
|
|
148
|
+
schema: z.object({
|
|
149
|
+
image: z.string().describe("Base64-encoded image data (JPEG, PNG, WebP, or TIFF). Do not include the data URI prefix."),
|
|
150
|
+
format: z.enum(["jpeg", "png", "webp", "preserve"]).default("preserve").describe("Output format. 'preserve' keeps the original format."),
|
|
151
|
+
quality: z.number().int().min(1).max(100).default(90).describe("Output quality for lossy formats (1-100)")
|
|
152
|
+
}),
|
|
153
|
+
func: async ({ image, format, quality }) => {
|
|
154
|
+
const result = await client.imageMetadataStripper({ image, format, quality });
|
|
155
|
+
return JSON.stringify(result);
|
|
156
|
+
}
|
|
157
|
+
}),
|
|
144
158
|
// ---- Brand Kit ----
|
|
145
159
|
new DynamicStructuredTool({
|
|
146
160
|
name: "generate_brand_kit",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-toolbelt",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Official SDK for Agent Toolbelt — typed API client and LangChain tool wrappers for schema generation, text extraction, token counting, CSV conversion, and more.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|