@niq.run/niq-linux-arm64 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/bin/README.md +71 -0
- package/bin/niq +0 -0
- package/package.json +9 -0
package/bin/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# niq
|
|
2
|
+
|
|
3
|
+
> **niq runs programs that haven't been written yet.**
|
|
4
|
+
|
|
5
|
+
niq is an **event-driven, decentralized agent runtime**. It is a single agent, but one composed of many **Workers** (a Worker Swarm) that collaborate over an event bus — each worker handles its own focus, and together they form the complete agent.
|
|
6
|
+
|
|
7
|
+
niq has exactly three core concepts:
|
|
8
|
+
|
|
9
|
+
- **Worker** — a unit that can do things, like an **actor**: it has its own state and communicates only by sending and reacting to messages. A Worker subscribes to events, processes them, and publishes new events. Every capability (reasoning, tool execution, safety guards, lifecycle) is a Worker; there is only one extension concept.
|
|
10
|
+
- **Program** — the source code of a Worker's capability (natural-language Prompts, or formalized DSL Scripts).
|
|
11
|
+
- **Event** — the only communication language between Workers, delivered over the event bus.
|
|
12
|
+
|
|
13
|
+
Core insight: **collaboration is extension.** niq grows not by adding new abstractions, but by adding more participants that cooperate over the event bus. Extending a capability and having a human join the collaboration are the same act — a user is just another collaborating participant, and there can be one or many of them. In niq, everything is workers collaborating over the event bus.
|
|
14
|
+
|
|
15
|
+
> **Status: early, fast-moving development.** The design is still evolving; APIs and behavior may change without notice.
|
|
16
|
+
|
|
17
|
+
## Project layout
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
core/ interfaces & types (contracts, not implementations)
|
|
21
|
+
pkg/ implementations (workers, services, bus, transports)
|
|
22
|
+
internal/ control plane, project runtime, WebUI
|
|
23
|
+
cmd/ CLI entry point
|
|
24
|
+
doc/ design docs & dev notes
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Quick start
|
|
28
|
+
|
|
29
|
+
### Prerequisites
|
|
30
|
+
|
|
31
|
+
- Go 1.22+
|
|
32
|
+
- A model API key (for the reason worker), set in `~/.zshenv`:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
export OPENAI_API_KEY=sk-xxxx
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Run
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
# Start the control plane (listens on :9527 by default)
|
|
42
|
+
cd niq && go run ./cmd/niq/
|
|
43
|
+
|
|
44
|
+
# Or build first
|
|
45
|
+
make build
|
|
46
|
+
./bin/niq
|
|
47
|
+
|
|
48
|
+
# Then create and run a project from the WebUI, or from the CLI:
|
|
49
|
+
./bin/niq project create my-project
|
|
50
|
+
./bin/niq project run my-project
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Once started, open <http://localhost:19763> for the WebUI — chat, inspect events, and view workers.
|
|
54
|
+
|
|
55
|
+
### Build & test
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
cd niq && go build ./... && go vet ./...
|
|
59
|
+
cd niq && go test ./pkg/eventbus/ -count=1
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Data directory
|
|
63
|
+
|
|
64
|
+
Runtime data lives under `~/.niq/`:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
~/.niq/
|
|
68
|
+
├── id/identities.json # worker identity registry (owned by the bus)
|
|
69
|
+
├── programs/ # Program storage
|
|
70
|
+
└── niq.log # run log
|
|
71
|
+
```
|
package/bin/niq
ADDED
|
Binary file
|