@cogitator-ai/wasm-tools 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 +13 -8
- package/dist/wasm/calc.wasm +0 -0
- package/dist/wasm/json.wasm +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -31,7 +31,12 @@ const result = await sandbox.execute({ expression: '2 + 2 * 3' });
|
|
|
31
31
|
```typescript
|
|
32
32
|
import { tool } from '@cogitator-ai/core';
|
|
33
33
|
import { WasmSandbox } from '@cogitator-ai/sandbox';
|
|
34
|
-
import {
|
|
34
|
+
import {
|
|
35
|
+
calcToolConfig,
|
|
36
|
+
calcToolSchema,
|
|
37
|
+
jsonToolConfig,
|
|
38
|
+
jsonToolSchema,
|
|
39
|
+
} from '@cogitator-ai/wasm-tools';
|
|
35
40
|
|
|
36
41
|
const calcSandbox = new WasmSandbox(calcToolConfig);
|
|
37
42
|
|
|
@@ -48,13 +53,13 @@ const calculator = tool({
|
|
|
48
53
|
|
|
49
54
|
### Available Exports
|
|
50
55
|
|
|
51
|
-
| Export
|
|
52
|
-
|
|
53
|
-
| `calcToolConfig`
|
|
54
|
-
| `calcToolSchema`
|
|
55
|
-
| `jsonToolConfig`
|
|
56
|
-
| `jsonToolSchema`
|
|
57
|
-
| `getWasmPath(name)` | Get path to a WASM module by name
|
|
56
|
+
| Export | Description |
|
|
57
|
+
| ------------------- | --------------------------------------------- |
|
|
58
|
+
| `calcToolConfig` | Sandbox config for calculator WASM module |
|
|
59
|
+
| `calcToolSchema` | Zod schema for calculator input |
|
|
60
|
+
| `jsonToolConfig` | Sandbox config for JSON processor WASM module |
|
|
61
|
+
| `jsonToolSchema` | Zod schema for JSON processor input |
|
|
62
|
+
| `getWasmPath(name)` | Get path to a WASM module by name |
|
|
58
63
|
|
|
59
64
|
## Security
|
|
60
65
|
|
package/dist/wasm/calc.wasm
CHANGED
|
Binary file
|
package/dist/wasm/json.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cogitator-ai/wasm-tools",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "WASM-based tools for Cogitator agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"zod": "^3.22.0",
|
|
20
|
-
"@cogitator-ai/types": "0.
|
|
20
|
+
"@cogitator-ai/types": "0.4.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@extism/js-pdk": "^1.0.0",
|