htmlark 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/LICENSE +21 -0
- package/README.md +53 -0
- package/htmlark.mjs +397 -0
- package/package.json +34 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 htmlark contributors
|
|
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,53 @@
|
|
|
1
|
+
# htmlark
|
|
2
|
+
|
|
3
|
+
Local-first runtime for AI-generated HTML/Markdown artifacts.
|
|
4
|
+
|
|
5
|
+
Site: **[htmlark.com](https://htmlark.com)**. Public pages: **[a.htmlark.com](https://a.htmlark.com)**.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Node 22.13+:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx htmlark
|
|
13
|
+
npx htmlark setup --json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Or download a binary from [GitHub Releases](https://github.com/nichenqin/htmlark/releases/latest) and put it on your `PATH`.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# macOS Apple silicon
|
|
20
|
+
curl -L https://github.com/nichenqin/htmlark/releases/latest/download/htmlark-darwin-arm64 -o htmlark
|
|
21
|
+
chmod +x htmlark
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Use
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
htmlark put --file ./page.html --key demo --json
|
|
28
|
+
htmlark open --id art_…
|
|
29
|
+
htmlark publish --id art_… --json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Store: `$HTMLARK_HOME` or `~/.htmlark`. Not NFS / iCloud / Dropbox.
|
|
33
|
+
|
|
34
|
+
## Agent contract
|
|
35
|
+
|
|
36
|
+
Always `--json` and `--key`. No CDN. On `code=CONFLICT`, get, re-apply, retry with `--base-version`. Do not `--force`. Do not share loopback URLs. Public share is `htmlark publish`.
|
|
37
|
+
|
|
38
|
+
Skill: `htmlark setup` writes `htmlark-authoring`. MCP: `htmlark mcp`.
|
|
39
|
+
|
|
40
|
+
## Security
|
|
41
|
+
|
|
42
|
+
Loopback Host allowlist, JSON + `X-Htmlark-Token` on mutations, no CORS. `/render` is CSP-sandboxed. Dirty versions 409.
|
|
43
|
+
|
|
44
|
+
## Layout
|
|
45
|
+
|
|
46
|
+
- `packages/core` commands + ports
|
|
47
|
+
- `packages/runtime` wrap / CSP / inspect
|
|
48
|
+
- `packages/http` `createLocalApp` / `createPublishApp`
|
|
49
|
+
- `apps/cli` citty, sqlite+CAS, MCP
|
|
50
|
+
- `apps/remote` Cloudflare Worker D1+R2
|
|
51
|
+
- `schema/commands.json` CLI catalog
|
|
52
|
+
|
|
53
|
+
See [PRD.md](./PRD.md).
|