@kohala/devkit 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/CHANGELOG.md +15 -0
- package/LICENSE +21 -0
- package/README.md +93 -0
- package/dist/cli/index.js +2246 -0
- package/dist/cli/index.js.map +1 -0
- package/package.json +81 -0
- package/templates/README.md +40 -0
- package/templates/kohala.json +17 -0
- package/templates/skills/_tools.py +125 -0
- package/templates/skills/main.py +35 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @kohala/devkit
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
Initial release.
|
|
6
|
+
|
|
7
|
+
- `kohala` CLI: `init`, `validate`, `run --local`, `trace`, `memory serve`,
|
|
8
|
+
`login`, `deploy`, `doctor`
|
|
9
|
+
- Local agent emulator with platform-parity enforcement: per-day admission,
|
|
10
|
+
tool allowlist, per-run token caps, validators with bounded repair loop
|
|
11
|
+
- Open MCP memory server (stdio + streamable HTTP) with file and Postgres
|
|
12
|
+
backends
|
|
13
|
+
- Stdlib-only Python script SDK over a loopback RPC boundary
|
|
14
|
+
- Deploy client for the kohala.ai REST API (idempotent, additive,
|
|
15
|
+
`--dry-run`)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kohala
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Kohala Devkit
|
|
2
|
+
|
|
3
|
+
Build and run [Kohala](https://kohala.ai) agents **entirely on your own
|
|
4
|
+
machine** — no account, no billing, no waitlist. When you want your agent
|
|
5
|
+
hosted, `kohala deploy` pushes the exact same agent to the platform.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @kohala/devkit
|
|
9
|
+
|
|
10
|
+
kohala init my-agent
|
|
11
|
+
kohala run my-agent --local
|
|
12
|
+
kohala trace my-agent
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
That's the whole loop. Python 3 is the only other thing you need (to run
|
|
16
|
+
skill scripts).
|
|
17
|
+
|
|
18
|
+
## What you get
|
|
19
|
+
|
|
20
|
+
- **`kohala` CLI** — `init`, `validate`, `run --local`, `trace`,
|
|
21
|
+
`memory serve`, `login`, `deploy`, `doctor`.
|
|
22
|
+
- **Local agent emulator** — executes your agent's charter with the
|
|
23
|
+
platform's exact enforcement order: per-day admission, tool allowlist,
|
|
24
|
+
per-run token caps, and validators with a bounded repair loop. Tokens are
|
|
25
|
+
counted for cap enforcement and shown in the trace, but **nothing is ever
|
|
26
|
+
billed locally**.
|
|
27
|
+
- **Open MCP memory server** — `kohala memory serve` exposes agent memory
|
|
28
|
+
over the [Model Context Protocol](https://modelcontextprotocol.io) with the
|
|
29
|
+
platform's tool names (`s3.put`, `s3.get`, `s3.list`, `s3.delete`). File
|
|
30
|
+
backend by default; Postgres with `--backend postgres`.
|
|
31
|
+
- **Python script SDK** — scaffolded into every agent (`skills/_tools.py`,
|
|
32
|
+
stdlib-only). Scripts talk to the runtime over a loopback RPC boundary, so
|
|
33
|
+
the same script runs unchanged locally and hosted.
|
|
34
|
+
- **Deploy client** — `kohala deploy` maps your `kohala.json` onto the
|
|
35
|
+
platform's REST API. Idempotent on agent name, additive only (never deletes
|
|
36
|
+
anything remotely), with `--dry-run` to see exactly what would be sent.
|
|
37
|
+
|
|
38
|
+
## The compatibility contract
|
|
39
|
+
|
|
40
|
+
`kohala.json` is a 1:1 mapping onto platform fields:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"name": "my-agent",
|
|
45
|
+
"charter": "Collect one interesting fact per shift.",
|
|
46
|
+
"toolAllowlist": ["s3.put", "s3.get", "s3.list", "notify.send"],
|
|
47
|
+
"runtimeMode": "wrap",
|
|
48
|
+
"skills": { "main": "main.py" },
|
|
49
|
+
"caps": { "perRunTokens": 20000, "perDayTokens": 100000 },
|
|
50
|
+
"validators": [
|
|
51
|
+
{ "type": "shape", "minBytes": 10 },
|
|
52
|
+
{ "type": "freshness", "asset": "my-agent/latest", "maxAgeHours": 24 }
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- `runtimeMode: "wrap"` executes your script directly and validates its
|
|
58
|
+
output (stdout).
|
|
59
|
+
- `runtimeMode: "llm"` runs a real tool-use loop against **your own**
|
|
60
|
+
`ANTHROPIC_API_KEY` — the devkit never mocks completions.
|
|
61
|
+
|
|
62
|
+
## Docs
|
|
63
|
+
|
|
64
|
+
- [Quickstart](docs/QUICKSTART.md)
|
|
65
|
+
- [Manifest reference](docs/MANIFEST.md)
|
|
66
|
+
- [How the emulator works](docs/EMULATOR.md)
|
|
67
|
+
- [Memory & the MCP server](docs/MEMORY.md)
|
|
68
|
+
- [Deploying to kohala.ai](docs/DEPLOY.md)
|
|
69
|
+
|
|
70
|
+
## Examples
|
|
71
|
+
|
|
72
|
+
- [`examples/weather-logger`](examples/weather-logger) — wrap mode, external
|
|
73
|
+
HTTP + memory + freshness validator.
|
|
74
|
+
- [`examples/rss-digest`](examples/rss-digest) — wrap mode with
|
|
75
|
+
`llm.complete` summarization (needs an LLM key).
|
|
76
|
+
- [`examples/llm-notes`](examples/llm-notes) — `runtimeMode: "llm"`, a real
|
|
77
|
+
tool-use loop (needs `ANTHROPIC_API_KEY`).
|
|
78
|
+
|
|
79
|
+
## Requirements
|
|
80
|
+
|
|
81
|
+
- Node.js ≥ 20
|
|
82
|
+
- Python 3 (to run skill scripts)
|
|
83
|
+
- Optional: `ANTHROPIC_API_KEY` or `GEMINI_API_KEY` for LLM features
|
|
84
|
+
- Optional: `pg` + a Postgres URL for the Postgres memory backend
|
|
85
|
+
- Optional: a Kohala account — **only** for `kohala deploy`
|
|
86
|
+
|
|
87
|
+
## Contributing
|
|
88
|
+
|
|
89
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Bug reports and PRs welcome.
|
|
90
|
+
|
|
91
|
+
## License
|
|
92
|
+
|
|
93
|
+
[MIT](LICENSE)
|