@niq.run/niq-linux-x64 0.4.0 → 0.5.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/bin/README.md +54 -2
- package/bin/niq +0 -0
- package/package.json +1 -1
package/bin/README.md
CHANGED
|
@@ -53,7 +53,39 @@ niq project create my-project
|
|
|
53
53
|
niq project run my-project
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Each project serves its own WebUI
|
|
56
|
+
Each project serves its own WebUI on a loopback-only port, so it is never
|
|
57
|
+
exposed by accident: open it through the control plane at
|
|
58
|
+
**http://localhost:9527/p/<id>/**, which proxies to that project. Ports are
|
|
59
|
+
assigned dynamically on first run and then persisted per project, so they stay
|
|
60
|
+
stable across restarts (`--bus` / `--webui` override). `niq project list` shows
|
|
61
|
+
each project's `webui` and `bus` ports.
|
|
62
|
+
|
|
63
|
+
### Server deployment
|
|
64
|
+
|
|
65
|
+
The control plane is the only port a deployment needs to expose: it serves the
|
|
66
|
+
SPA, the project-management API and every project's WebUI (at `/p/<id>/`).
|
|
67
|
+
Projects and the event bus bind loopback only, so they stay unreachable from
|
|
68
|
+
outside even on a public machine.
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
niq --addr :9527 --auth alice:s3cret
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Configure credentials before exposing the port: requests from any non-loopback
|
|
75
|
+
address are then answered with a 401 until they authenticate, while requests from
|
|
76
|
+
the machine itself stay password-free. `--auth` (control plane) and
|
|
77
|
+
`--webui-auth` (a project started by hand) persist to and read from the same
|
|
78
|
+
`~/.niq/common/auth.json`, so one pair of credentials covers everything. Without
|
|
79
|
+
credentials remote callers are locked out entirely, and niq warns about the
|
|
80
|
+
binding at startup.
|
|
81
|
+
|
|
82
|
+
Basic auth sends the credentials on every request, so terminate TLS in front (or
|
|
83
|
+
tunnel through SSH/WireGuard) before exposing niq to the open internet — niq
|
|
84
|
+
itself speaks plain HTTP.
|
|
85
|
+
|
|
86
|
+
After upgrading the binary, restart the running projects: their page and static
|
|
87
|
+
assets are served by the control plane, and an old project process may reference
|
|
88
|
+
asset files the new binary no longer contains.
|
|
57
89
|
|
|
58
90
|
### Model provider
|
|
59
91
|
|
|
@@ -77,9 +109,29 @@ go build ./... && go vet ./...
|
|
|
77
109
|
go test ./pkg/eventbus/ -count=1
|
|
78
110
|
```
|
|
79
111
|
|
|
112
|
+
The WebUI bundle is committed (it is `go:embed`-ed), so rebuild and commit it
|
|
113
|
+
after changing anything under `internal/webui/assets/src`:
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
cd internal/webui/assets && npm run build
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Frontend development
|
|
120
|
+
|
|
121
|
+
With the control plane running, the Vite dev server (`npm run dev` in
|
|
122
|
+
`internal/webui/assets`, port 5173) proxies API traffic to :9527, so both pages
|
|
123
|
+
work with HMR:
|
|
124
|
+
|
|
125
|
+
- control plane UI: http://localhost:5173/
|
|
126
|
+
- a project's UI: http://localhost:5173/p/<id>/ (that project must be running)
|
|
127
|
+
|
|
80
128
|
## Data directory
|
|
81
129
|
|
|
82
|
-
Runtime data lives under `~/.niq
|
|
130
|
+
Runtime data lives under `~/.niq/` by default. Set the `NIQ_HOME` environment
|
|
131
|
+
variable to relocate this root to a custom directory (for a portable install,
|
|
132
|
+
tests, or to keep state out of your home dir); `~`/`~/` in the value are
|
|
133
|
+
expanded. `NIQ_AUTH_CONFIG` and `NIQ_PROVIDER_CONFIG` still override those two
|
|
134
|
+
individual files wholesale, taking priority over `NIQ_HOME`.
|
|
83
135
|
|
|
84
136
|
```
|
|
85
137
|
~/.niq/
|
package/bin/niq
CHANGED
|
Binary file
|