@agntn/tools 0.0.0 โ 0.1.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 +5 -3
- package/dist/_chunks/libs/typebox.d.mts +869 -535
- package/dist/_chunks/libs/typebox.d.mts.map +1 -1
- package/dist/_chunks/libs/typebox.mjs +234 -3
- package/dist/_chunks/libs/typebox.mjs.map +1 -1
- package/dist/_chunks/src.mjs +158 -0
- package/dist/_chunks/src.mjs.map +1 -0
- package/dist/ai.d.mts +3 -4
- package/dist/ai.d.mts.map +1 -1
- package/dist/ai.mjs +1 -1
- package/dist/cli.d.mts +65 -0
- package/dist/cli.d.mts.map +1 -0
- package/dist/cli.mjs +393 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.d.mts +38 -20
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -90
- package/dist/mcp.d.mts +6 -7
- package/dist/mcp.d.mts.map +1 -1
- package/dist/mcp.mjs +2 -1
- package/dist/mcp.mjs.map +1 -1
- package/dist/omp.d.mts +4 -5
- package/dist/omp.d.mts.map +1 -1
- package/dist/omp.mjs +1 -1
- package/dist/pi.d.mts +3 -4
- package/dist/pi.d.mts.map +1 -1
- package/dist/pi.mjs +1 -1
- package/package.json +19 -16
- package/dist/index.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -16,13 +16,14 @@ MCP wants an `inputSchema`. Pi wants `parameters` and a prompt snippet. OMP swap
|
|
|
16
16
|
## โจ Features
|
|
17
17
|
|
|
18
18
|
- ๐ **One definition.** Name, schema, effect and `execute`. That's the whole tool.
|
|
19
|
-
- ๐ **Four adapters.** `createMcpServer`, `registerPiTools`, `registerOmpTools` and `toAiTool`. One call each.
|
|
19
|
+
- ๐ **Four host adapters.** `createMcpServer`, `registerPiTools`, `registerOmpTools` and `toAiTool`. One call each.
|
|
20
20
|
- ๐ก๏ธ **Validation on every host.** The core checks each call before your code runs. Even when the host skips its own check.
|
|
21
21
|
- ๐ฃ๏ธ **Errors a model can use.** A misspelled key names itself and the keys you do take. An enum lists its values.
|
|
22
22
|
- ๐งต **One line per error.** Newlines, escape codes and bidi tricks in echoed text get flattened. No forged lines.
|
|
23
23
|
- ๐ชค **The OMP TypeBox trap, defused.** TypeBox is bundled, so OMP has nothing left to rewrite behind your back.
|
|
24
24
|
- ๐งช **Schema rules at definition time.** An open object or a union of literals fails in `defineTool`. Not three weeks later in a model's hands.
|
|
25
|
-
-
|
|
25
|
+
- โจ๏ธ **A CLI on the side.** `runCli` turns the same tools into commands, no CLI library needed. Flags come from the schema. A hint adds positionals and stdin.
|
|
26
|
+
- ๐ **Runs anywhere.** No `node:*` import in the core or the host adapters. The docs site runs them in a browser tab. The CLI is the one Node part, as a CLI should be.
|
|
26
27
|
|
|
27
28
|
## ๐ฆ Install
|
|
28
29
|
|
|
@@ -88,12 +89,13 @@ The typo never reached `execute`. The model gets told what it did wrong and what
|
|
|
88
89
|
| Pi | `registerPiTools` from `@agntn/tools/pi` | `@earendil-works/pi-coding-agent` |
|
|
89
90
|
| OMP | `registerOmpTools` from `@agntn/tools/omp` | `@oh-my-pi/pi-coding-agent` |
|
|
90
91
|
| AI SDK | `toAiTool` from `@agntn/tools/ai` | `ai` |
|
|
92
|
+
| CLI | `runCli` from `@agntn/tools/cli` | none |
|
|
91
93
|
|
|
92
94
|
Install only what you ship. An MCP server doesn't need the AI SDK, and nobody makes it pretend. Every host has its own page with the gotchas: [tools.agntn.dev/hosts](https://tools.agntn.dev/hosts).
|
|
93
95
|
|
|
94
96
|
## ๐ซ What this does not do
|
|
95
97
|
|
|
96
|
-
It doesn't run your server or pick a transport. Stdio, HTTP, in memory, your call. And it isn't a schema library. TypeBox does that part, this just makes sure every host sees the same one.
|
|
98
|
+
It doesn't run your server or pick a transport. Stdio, HTTP, in memory, your call. Unless you ask `runCli` for its `mcp` command. That one is stdio. And it isn't a schema library. TypeBox does that part, this just makes sure every host sees the same one.
|
|
97
99
|
|
|
98
100
|
## ๐ ๏ธ Development
|
|
99
101
|
|