@matteai/stma-server 0.11.0 → 0.11.2
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 +86 -0
- package/dist/index.js +1684 -637
- package/package.json +2 -2
- package/dist/index.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# @matteai/stma-server
|
|
2
|
+
|
|
3
|
+
The **STMA (Speak to my Agent)** server — a self-hostable control plane for a team's AI
|
|
4
|
+
coding agents. It runs the MCP endpoint agents connect to and the web console people read,
|
|
5
|
+
on an embedded database, with no setup.
|
|
6
|
+
|
|
7
|
+
STMA answers the questions a team gets the moment more than one agent is working:
|
|
8
|
+
who is running what, on which machine, against which task — and is anyone else already
|
|
9
|
+
holding the file, the migration or the contract this one is about to change.
|
|
10
|
+
|
|
11
|
+
## Run it
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @matteai/stma serve # the CLI starts this server for you (recommended)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
or directly:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @matteai/stma-server
|
|
21
|
+
EMBEDDED_DB=1 PGLITE_DIR=~/.stma/data BASE_URL=http://localhost:3000 stma-server
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then open http://localhost:3000, create the first account, create a token, and paste the
|
|
25
|
+
connect line into your agent:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
claude mcp add --scope user --transport http stma http://localhost:3000/mcp \
|
|
29
|
+
--header "Authorization: Bearer stma_YOUR_TOKEN"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The server assumes **production** unless started with `--dev`, so the passwordless
|
|
33
|
+
development login is off and the first account you create needs a real password.
|
|
34
|
+
|
|
35
|
+
## What it gives the agents
|
|
36
|
+
|
|
37
|
+
27 MCP tools over Streamable HTTP at `/mcp`, in four groups:
|
|
38
|
+
|
|
39
|
+
- **Fleet** — `start_run`, `update_run`, `finish_run`, `list_active_agents`, `handoff_work`,
|
|
40
|
+
`get_policy`, `get_workflow`, `get_evidence`, `check_environment`, `list_issues`.
|
|
41
|
+
Runs are mapped to a human, a project and a task; work claims are leased and overlapping
|
|
42
|
+
ones are detected deterministically, so two agents are warned *before* they edit the same
|
|
43
|
+
ground. Claims are advisory: STMA warns, it never locks a file.
|
|
44
|
+
- **Environments** — `push_snapshot`, `compare_env`, `get_snapshot_checklist`. Structured
|
|
45
|
+
machine snapshots and a mechanical diff, so "works on my machine" stops being a
|
|
46
|
+
conversation between humans copy-pasting logs. **Secret values never leave the machine —
|
|
47
|
+
variable names only.**
|
|
48
|
+
- **Sessions** — `open_session`, `post_message`, `resolve_session`, `inbox`,
|
|
49
|
+
`search_past_issues`. Asynchronous debug threads an agent reads from its inbox the next
|
|
50
|
+
time it runs, and a resolved archive the next agent can search.
|
|
51
|
+
- **Identity** — `whoami`, `list_teammates`, `create_invite`, `onboard_repo`,
|
|
52
|
+
`list_projects`, `announce`.
|
|
53
|
+
|
|
54
|
+
Everything a person needs to see is a plain server-rendered page: the live agent map,
|
|
55
|
+
governance (did the rules actually reach the agents), delivery flows, environment compare,
|
|
56
|
+
and the activity trail.
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
| Variable | Default | What it does |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| `DATABASE_URL` | — | Postgres. Required in production unless `EMBEDDED_DB=1` |
|
|
63
|
+
| `EMBEDDED_DB` | `0` | `1` runs the embedded database (single instance; persist `PGLITE_DIR`) |
|
|
64
|
+
| `PGLITE_DIR` | `.data/pglite` | Where the embedded database lives |
|
|
65
|
+
| `BASE_URL` | `http://localhost:3000` | Public URL, used in invite and connect snippets |
|
|
66
|
+
| `PORT` / `HOST` | `3000` / `0.0.0.0` | Listen address |
|
|
67
|
+
| `SIGNUPS_OPEN` | `1` | `0` closes registration (invite-only) |
|
|
68
|
+
| `RESEND_API_KEY` | — | Enables email: sign-in codes, notifications, password reset |
|
|
69
|
+
| `AUTH_2FA` | auto | `1`/`0` forces emailed sign-in codes on or off |
|
|
70
|
+
|
|
71
|
+
Migrations run automatically on boot. The full table is in the repository README.
|
|
72
|
+
|
|
73
|
+
## Self-hosting is the full product
|
|
74
|
+
|
|
75
|
+
Plan limits only apply to the hosted service (`STMA_HOSTED=1`). An instance you run
|
|
76
|
+
yourself is unmetered: the fleet, governance, evidence, savings and retention are all open.
|
|
77
|
+
|
|
78
|
+
Docker and Compose files ship with the repository; `ghcr.io/matte-ai-llc/stma` is the same
|
|
79
|
+
build as this package.
|
|
80
|
+
|
|
81
|
+
## Licence
|
|
82
|
+
|
|
83
|
+
Elastic License 2.0. You can run it, modify it and self-host it freely; you may not offer
|
|
84
|
+
it to third parties as a hosted service.
|
|
85
|
+
|
|
86
|
+
Documentation: [stma.ai/docs](https://stma.ai/docs) · The hosted service is in private beta.
|