holon-types 0.0.1-dev.18 → 0.0.1-dev.19
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 +62 -0
- package/THIRD-PARTY-NOTICES +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -21,6 +21,28 @@ Or with [Go](https://go.dev/doc/install) 1.27+:
|
|
|
21
21
|
go install github.com/holon-sh/cli/cmd/holon@latest
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
## Create an app
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
holon init orders --lang py
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`--lang ts` writes the server in TypeScript instead, and `--lang go` in Go. Each app has an MCP server with one tool, `greet`, and a view the server returns as an [MCP App](https://modelcontextprotocol.io/extensions/apps/overview) and Holon serves as a page. The view calls the tool through a typed client:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
// orders/ui/main.ts
|
|
34
|
+
const { result } = await server.tools.greet({ name: name.value });
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`holon init` pins the newest Holon SDK releases (on npm, those that read the clients it writes), installs the dependencies (`uv` for Python, `go get` for Go, the project's package manager for Node.js), generates the clients, and adds the app to `holon.yaml`. `holon types check` then type-checks the server and the view. A Go server's contract isn't read from its source, so its view calls `greet` untyped, and `go build` type-checks the server. Run the app with [`holon dev`](https://holon-labs.dev/docs/).
|
|
38
|
+
|
|
39
|
+
In an existing Go module, Python project or Node.js project, `holon init` adds the server and the view beside the project's files, and the dependencies to its `go.mod`, `pyproject.toml` or `package.json`:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
cd billing
|
|
43
|
+
holon init
|
|
44
|
+
```
|
|
45
|
+
|
|
24
46
|
## Example
|
|
25
47
|
|
|
26
48
|
Declare dependencies under `sh.holon.requires` in your project's [`server.json`](https://modelcontextprotocol.io/registry/quickstart#step-4-create-server-json) ([publisher-provided metadata](https://modelcontextprotocol.io/registry/faq#can-i-add-custom-metadata-when-publishing)). This example uses the public [Context7](https://registry.modelcontextprotocol.io/v0.1/servers/io.github.upstash%2Fcontext7/versions/4.4.4) server.
|
|
@@ -206,6 +228,46 @@ holon types check -s docs=https://mcp.example.com/mcp
|
|
|
206
228
|
|
|
207
229
|
## Reference
|
|
208
230
|
|
|
231
|
+
<details open>
|
|
232
|
+
<summary><code>holon init</code></summary>
|
|
233
|
+
|
|
234
|
+
```text
|
|
235
|
+
Create an app in DIR, or the working directory: an MCP server in Go, Python or TypeScript, and a
|
|
236
|
+
view it serves as an MCP App and as a page. The app is named after DIR.
|
|
237
|
+
|
|
238
|
+
In an empty or absent DIR, holon init writes a new project. In a Go module (go.mod), a Python
|
|
239
|
+
project (pyproject.toml) or a Node.js project (package.json), it adds the server and the view beside
|
|
240
|
+
the project's own files: Go and Python dependencies through go get and uv, npm packages into
|
|
241
|
+
package.json, and lines to .gitignore. It leaves the project's scripts and tsconfig.json as written.
|
|
242
|
+
|
|
243
|
+
holon init pins the newest Holon SDK releases, on npm those that read the clients this holon writes,
|
|
244
|
+
installs the dependencies, generates the clients, and adds the app to the working directory's
|
|
245
|
+
holon.yaml when DIR is inside it, or else to DIR's.
|
|
246
|
+
|
|
247
|
+
Usage:
|
|
248
|
+
holon init [DIR] [flags]
|
|
249
|
+
|
|
250
|
+
Examples:
|
|
251
|
+
# A Go app in ./orders
|
|
252
|
+
holon init orders --lang go
|
|
253
|
+
|
|
254
|
+
# A Python app in ./orders
|
|
255
|
+
holon init orders --lang py
|
|
256
|
+
|
|
257
|
+
# A TypeScript app in the working directory, with its MCP server name
|
|
258
|
+
holon init --lang ts --name io.github.acme/orders
|
|
259
|
+
|
|
260
|
+
# Add an app to the Python project in the working directory
|
|
261
|
+
holon init
|
|
262
|
+
|
|
263
|
+
Flags:
|
|
264
|
+
-h, --help help for init
|
|
265
|
+
--lang string The server's language: go, py or ts; detected in an existing project
|
|
266
|
+
--name string The MCP server name (default com.example/APP)
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
</details>
|
|
270
|
+
|
|
209
271
|
<details open>
|
|
210
272
|
<summary><code>holon types generate</code></summary>
|
|
211
273
|
|
package/THIRD-PARTY-NOTICES
CHANGED
|
@@ -212,7 +212,7 @@ Copyright 2026 Holon Systems, Inc.
|
|
|
212
212
|
|
|
213
213
|
--------------------------------------------------------------------------------
|
|
214
214
|
|
|
215
|
-
Kiln SDK, https://github.com/hughhan1/kiln at
|
|
215
|
+
Kiln SDK, https://github.com/hughhan1/kiln at c996ac50ae051bd0fcb8793d40cd13a1bc83bbd9
|
|
216
216
|
Linked into holon through cgo. kiln_ocaml.opam.locked at that commit pins the opam packages it links.
|
|
217
217
|
|
|
218
218
|
MIT License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "holon-types",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.19",
|
|
4
4
|
"description": "The holon CLI: typed clients for MCP servers, generated and type-checked",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"node": ">=22"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"holon-types-darwin-x64": "0.0.1-dev.
|
|
19
|
-
"holon-types-darwin-arm64": "0.0.1-dev.
|
|
20
|
-
"holon-types-linux-x64": "0.0.1-dev.
|
|
21
|
-
"holon-types-linux-arm64": "0.0.1-dev.
|
|
18
|
+
"holon-types-darwin-x64": "0.0.1-dev.19",
|
|
19
|
+
"holon-types-darwin-arm64": "0.0.1-dev.19",
|
|
20
|
+
"holon-types-linux-x64": "0.0.1-dev.19",
|
|
21
|
+
"holon-types-linux-arm64": "0.0.1-dev.19"
|
|
22
22
|
}
|
|
23
23
|
}
|