@shigar/muaz 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/README.md CHANGED
@@ -56,8 +56,8 @@ The REPL opens immediately. Type your message and press Enter. Use `/help` to se
56
56
  ## Directory layout
57
57
 
58
58
  After the first run, `~/.muaz/` looks like this. Authored content lives inside
59
- plugins — your own in the `local` workspace, shared ones under `plugins/`, and
60
- read-only defaults under `builtins/`:
59
+ plugins — your own in the `local` workspace and shared ones under `plugins/`.
60
+ Read-only defaults ship inside the binary:
61
61
 
62
62
  ```
63
63
  ~/.muaz/
@@ -66,8 +66,8 @@ read-only defaults under `builtins/`:
66
66
  ├── plugins.yaml # per-plugin state (enabled / priority / trusted / source)
67
67
  ├── mcp.json # global MCP server registry
68
68
  ├── secrets.json # chmod-600 API-key store (only when no OS keychain is available)
69
- ├── builtins/
70
- │ └── preset/ # embedded read-only `starter` agent + preset pipelines (refreshed each start)
69
+ ├── registry-state.json # chmod-600 newest plugin-index serial seen per registry
70
+ ├── gateway-token # chmod-600 persisted gateway token
71
71
  ├── plugins/
72
72
  │ ├── local/ # YOUR workspace
73
73
  │ │ ├── agents/ # agents you create
@@ -79,9 +79,18 @@ read-only defaults under `builtins/`:
79
79
  ├── sessions/ # saved sessions + index.json
80
80
  ├── memory/ # cross-session notebooks: global.md, agents/, projects/
81
81
  ├── audit/ # append-only security audit log (audit.jsonl)
82
+ ├── cache/ # content-addressed mirrors of the shipped built-ins
82
83
  └── runtimes/ # on-demand Node.js / uv runtimes for MCP servers
83
84
  ```
84
85
 
86
+ Everything above except `secrets.json`, `audit/`, `gateway-token` and `runtimes/`
87
+ is addressed as a *document* rather than a path, which is what lets a shared
88
+ deployment keep it in a database instead of on a disk — see
89
+ [Deployment settings](#deployment-settings). The exceptions are deliberate:
90
+ credentials never enter shared storage, downloaded runtimes are a machine-specific
91
+ cache, and the gateway token is a local convenience a server passes as
92
+ `MUAZ_GATEWAY_TOKEN` instead.
93
+
85
94
  ## Configuration
86
95
 
87
96
  ### Global config (`~/.muaz/config.yaml`)
@@ -306,6 +315,48 @@ provider:
306
315
  think: "high" # optional; thinking mode: enabled / high / medium / low
307
316
  ```
308
317
 
318
+ ## Deployment settings
319
+
320
+ Everything above describes a personal install, where you own `config.yaml` and
321
+ nothing overrides you. A **shared** muaz — a team server, a container, one
322
+ sandbox per user — needs two more things: somewhere other than `~/.muaz` to keep
323
+ state, and a way to fix settings the person using it must not be able to relax.
324
+
325
+ Both come from the process environment, read once at startup. With none of them
326
+ set, muaz is exactly the local install described above.
327
+
328
+ | Variable | Meaning |
329
+ |---|---|
330
+ | `MUAZ_STORE` | Backend: unset or `fs` (`~/.muaz`), `fs:<dir>`, an absolute path, `memory`, `mongodb://…`, `dynamodb://<table>` |
331
+ | `MUAZ_SCOPE` | Tenant partition, default `local`. One process serves one scope |
332
+ | `MUAZ_CONFIG_FILE` | YAML file of settings the user cannot loosen |
333
+ | `MUAZ_NETWORK` / `MUAZ_ALLOWLIST_ONLY` / `MUAZ_ALLOWED_URLS` / `MUAZ_DENIED_URLS` / `MUAZ_BLOCKED_TOOLS` | The same pins without a file |
334
+
335
+ Scope is part of the key at rest rather than a filter applied afterwards, so one
336
+ shared store behind many single-user processes cannot leak between them. Under a
337
+ filesystem store, scope `local` maps to the directory itself — which is what
338
+ keeps your laptop's `~/.muaz` exactly where it is — and any other scope gets a
339
+ sibling directory with its own secrets and audit log.
340
+
341
+ MongoDB and DynamoDB are **opt-in build features**, so the binary you install
342
+ locally carries neither driver; naming a backend that was not compiled in tells
343
+ you which feature is missing rather than failing vaguely.
344
+
345
+ ```bash
346
+ cargo build --release -p muaz --features store-mongodb,store-dynamodb
347
+
348
+ MUAZ_STORE='mongodb://muaz:pw@db.internal:27017/muaz?tls=true' \
349
+ MUAZ_SCOPE=user:alice muaz gateway --host 0.0.0.0
350
+ ```
351
+
352
+ With a database backend, sessions and the audit log stop being files — each
353
+ backend brings a native session repository and audit sink alongside the object
354
+ store, and `muaz doctor` reports all three. muaz refuses an unencrypted MongoDB
355
+ connection to a remote host, and never creates a DynamoDB table (a table with a
356
+ secondary index is infrastructure). The full walkthrough, including the
357
+ `create-table` invocation and how pinned settings compose with the user's, is in
358
+ [Configuration → Deployment settings](https://shigar.dev/muaz/docs/cli/configuration/#deployment-settings).
359
+
309
360
  ## CLI reference
310
361
 
311
362
  ```
@@ -623,6 +674,24 @@ Pipelines wire multiple agents together for complex workflows. Define them as YA
623
674
 
624
675
  A pipeline is a single ordered list of **`steps`**. There is no `pattern` field — sequential, parallel, and router flows are all expressed with steps.
625
676
 
677
+ One pipeline ships built in: **`code-review`**, an adversarial review where `review-proposer` reports defects, `review-disputer` attacks the list, and `review-arbiter` decides which findings survive.
678
+
679
+ ```bash
680
+ muaz pipeline run code-review "the staged changes"
681
+ ```
682
+
683
+ Because each step names an agent, each step is separately bindable — bind the proposer and disputer to *different* models in `models.yaml` so the dispute step isn't checking the proposer's work with the proposer's blind spots:
684
+
685
+ ```yaml
686
+ agents:
687
+ "@preset/review-proposer": { profile: anthropic-main }
688
+ "@preset/review-disputer": { profile: openai-main }
689
+ ```
690
+
691
+ Agents built purely to be steps carry `entrypoint: false`, which keeps them out of the pickers that start a new chat. They are otherwise ordinary agents: resolvable by name, listed by `muaz agents list` (tagged `(step)`), separately bindable, and chattable on request when you want to iterate on their prompt.
692
+
693
+ The examples below name agents like `researcher` and `writer` to show the shape — those are agents you would author, not ones muaz ships.
694
+
626
695
  ### Sequential
627
696
 
628
697
  Each step names itself, so later steps can read its output.
@@ -710,7 +779,10 @@ The command runs via `sh -c`. Environment variables available:
710
779
 
711
780
  ## Session management
712
781
 
713
- Sessions are saved to `~/.muaz/sessions/` as JSON files (one per session). An `index.json` tracks metadata for the last 20 sessions.
782
+ Sessions are saved to `~/.muaz/sessions/` as JSON files (one per session, chmod
783
+ 600), with an `index.json` beside them holding the metadata `/sessions` lists.
784
+ Under a database backend they are rows instead, listed by recency with no index
785
+ document to maintain — the commands below are identical either way.
714
786
 
715
787
  - Use `--session <id>` to resume a session on startup
716
788
  - Use `/sessions` to browse and resume from within the REPL
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "hasInstallScript": true,
20
20
  "name": "@shigar/muaz",
21
- "version": "0.4.0"
21
+ "version": "0.5.0"
22
22
  },
23
23
  "node_modules/detect-libc": {
24
24
  "engines": {
@@ -47,5 +47,5 @@
47
47
  }
48
48
  },
49
49
  "requires": true,
50
- "version": "0.4.0"
50
+ "version": "0.5.0"
51
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "artifactDownloadUrls": [
3
- "https://github.com/shigar-dev/releases-muaz/releases/download/v0.4.0"
3
+ "https://github.com/shigar-dev/releases-muaz/releases/download/v0.5.0"
4
4
  ],
5
5
  "author": "shigar ltd",
6
6
  "bin": {
@@ -81,7 +81,7 @@
81
81
  "zipExt": ".tar.xz"
82
82
  }
83
83
  },
84
- "version": "0.4.0",
84
+ "version": "0.5.0",
85
85
  "volta": {
86
86
  "node": "18.14.1",
87
87
  "npm": "9.5.0"