@grid-is/agent-tools 0.2.2 → 0.3.0
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 +23 -0
- package/dist/dist-B8AoRnKf.js +165 -0
- package/dist/index-DlMJis5l.d.ts +1899 -0
- package/dist/index.d.ts +2 -1546
- package/dist/index.js +3 -167
- package/dist/tools.d.ts +2 -0
- package/dist/tools.js +1 -0
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -38,6 +38,25 @@ import { serveStdio, createGridTools } from "@grid-is/agent-tools";
|
|
|
38
38
|
await serveStdio({ tools: createGridTools() });
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
## The tools alone
|
|
42
|
+
|
|
43
|
+
`@grid-is/agent-tools/tools` exports the spreadsheet tools without the MCP
|
|
44
|
+
server and the file-based workbook session. They run against an in-memory
|
|
45
|
+
`Model`, in Node or in a browser bundle:
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
import { Model } from "@grid-is/apiary";
|
|
49
|
+
import { describeStructure, editCells, spreadsheetTools } from "@grid-is/agent-tools/tools";
|
|
50
|
+
|
|
51
|
+
await Model.preconditions;
|
|
52
|
+
const model = await Model.fromXLSX(bytes, "budget.xlsx");
|
|
53
|
+
const structure = describeStructure.execute({ model }, {});
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Each tool is `{ name, description, parameters, execute }`; `parameters` is a
|
|
57
|
+
zod schema, so `z.toJSONSchema(tool.parameters)` produces the JSON Schema an
|
|
58
|
+
agent SDK expects.
|
|
59
|
+
|
|
41
60
|
## Tools
|
|
42
61
|
|
|
43
62
|
| Group | Tools |
|
|
@@ -70,8 +89,12 @@ npm run build # tsdown → dist/
|
|
|
70
89
|
npm test # smoke test against test/fixtures/sample.xlsx
|
|
71
90
|
npm run typecheck
|
|
72
91
|
npm run gen:docs # regenerate the per-tool reference under docs/src/content/docs/tools/
|
|
92
|
+
npm run test:hosts # run the packed server under Claude Code and Codex, each in a fresh state directory
|
|
73
93
|
```
|
|
74
94
|
|
|
95
|
+
`test:hosts` needs the `claude` CLI with `ANTHROPIC_API_KEY`, and the `codex`
|
|
96
|
+
CLI with `CODEX_API_KEY` or a saved login. A host that is missing is skipped.
|
|
97
|
+
|
|
75
98
|
## Releasing
|
|
76
99
|
|
|
77
100
|
Releases are managed with [changesets](https://github.com/changesets/changesets).
|