@tpmjs/registry-execute 0.1.0 → 0.1.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 +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,16 +13,20 @@ pnpm add @tpmjs/registry-execute
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import {
|
|
16
|
+
import { streamText } from 'ai';
|
|
17
|
+
import { anthropic } from '@ai-sdk/anthropic';
|
|
17
18
|
import { registrySearchTool } from '@tpmjs/registry-search';
|
|
18
19
|
import { registryExecuteTool } from '@tpmjs/registry-execute';
|
|
19
20
|
|
|
20
|
-
const
|
|
21
|
-
model: '
|
|
21
|
+
const result = streamText({
|
|
22
|
+
model: anthropic('claude-sonnet-4-20250514'),
|
|
22
23
|
tools: {
|
|
23
24
|
registrySearch: registrySearchTool,
|
|
24
25
|
registryExecute: registryExecuteTool,
|
|
25
26
|
},
|
|
27
|
+
system: `You have access to the TPMJS tool registry.
|
|
28
|
+
Use registrySearch to find tools, then registryExecute to run them.`,
|
|
29
|
+
prompt: 'Search for web scraping tools and scrape https://example.com',
|
|
26
30
|
});
|
|
27
31
|
|
|
28
32
|
// The agent can now:
|