@ainecto/cli 0.8.1 → 0.10.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
@@ -3,7 +3,8 @@
3
3
  Published as `ainecto`, `@ainecto/mcp` and `@ainecto/cli` — the same code. Command: `ainecto`.
4
4
 
5
5
  **Once per machine:** `npx -y ainecto@latest setup` — signs you in through the browser (once), checks the
6
- connection, and connects Claude Code, Cursor, and Codex to AiNecto.
6
+ connection, and connects Claude Code, Cursor, and Codex to the AiNecto server address
7
+ (`https://ainecto.com/mcp`). Each agent then signs in to AiNecto by itself the first time it connects.
7
8
 
8
9
  Every AI session sees the same AiNecto tools. What a tool may change is decided by your AiNecto
9
10
  permissions on the workspace, project, or document it touches — the server refuses the rest. There are
@@ -14,6 +15,10 @@ no session roles (Design / Development / Test / Validation were removed in 0.8.0
14
15
  **Run `npx -y ainecto@latest setup` (use a long command timeout — at least 6 minutes: sign-in waits up
15
16
  to 5 minutes for the user). Then run `npx -y ainecto@latest doctor` and do what it says.**
16
17
 
18
+ - `setup` registers the server address, so each agent signs in on its own the first time: Claude Code —
19
+ run `/mcp` in a session and sign in to `ainecto`; Cursor — sign in when `ainecto` asks in its MCP
20
+ settings; Codex — signs in while `setup` connects it (a browser tab opens and the sign-in link is
21
+ printed to stderr; if it did not finish, run `codex mcp login ainecto`).
17
22
  - To add AiNecto's working rules to a repository, run `npx -y ainecto@latest init` from its root. It
18
23
  does not ask for a role or a project.
19
24
  - **A server added during a session is not available in that session.** Keep working through the CLI:
@@ -29,6 +34,7 @@ to 5 minutes for the user). Then run `npx -y ainecto@latest doctor` and do what
29
34
  ```bash
30
35
  npx -y ainecto@latest setup # sign in, check, connect Claude Code · Cursor · Codex
31
36
  npx -y ainecto@latest setup --dry-run # show what it would do — no sign-in, no changes
37
+ npx -y ainecto@latest setup --local # connect through the local relay instead (see below)
32
38
  npx -y ainecto@latest setup --undo # remove the connections setup made (sign-in stays)
33
39
  npx -y ainecto@latest status # who is signed in, your AiNecto role, what is connected
34
40
  npx -y ainecto@latest doctor # what is missing, and the one command that fixes each item
@@ -38,33 +44,62 @@ npx -y ainecto@latest doctor # what is missing, and the one command
38
44
  `ainecto` entry, left untouched), `not installed`, or `failed`; if any client fails it says «partial» and
39
45
  exits 1:
40
46
 
41
- - Claude Code — `claude mcp add -s user ainecto -- npx -y @ainecto/mcp@<version>` (user scope).
42
- - Cursor — merges the same entry into `~/.cursor/mcp.json`, keeping your other servers.
43
- - Codex — `codex mcp add ainecto -- npx -y @ainecto/mcp@<version>`.
47
+ - Claude Code — `claude mcp add --transport http -s user ainecto https://ainecto.com/mcp` (user scope).
48
+ Sign in with `/mcp` in a session.
49
+ - Cursor — merges `"ainecto": { "url": "https://ainecto.com/mcp" }` into `~/.cursor/mcp.json`, keeping
50
+ your other servers. Cursor asks you to sign in from its MCP settings.
51
+ - Codex — `codex mcp add ainecto --url https://ainecto.com/mcp`. Codex starts its sign-in right away
52
+ (a browser tab opens; `setup` passes Codex's output, with the sign-in link, through to stderr). If that
53
+ did not finish within 90 seconds, Codex shows as `failed` but stays connected — run
54
+ `codex mcp login ainecto` (re-running `setup` says the same).
44
55
 
45
- The entry is pinned to the CLI version that wrote it; re-run `setup` to move to a newer one (`doctor`
46
- tells you when one is available). Your AiNecto role (your job, set in AiNecto's account settings) is
47
- shown by `setup` and `status`; AI uses it to pitch explanations — it does not change permissions.
56
+ With `--env dev` (or `--endpoint`) the address is that environment's. The server address has no version
57
+ to pin: a server update reaches every agent at once. Entries an older `setup` wrote
58
+ (`npx -y @ainecto/mcp@<version>`, with or without `--role`) are rewritten to the server address when you
59
+ re-run `setup`; `setup --undo` removes either kind.
60
+
61
+ `setup --local` registers the local relay instead — `npx -y @ainecto/mcp@<version>` (stdio, pinned to
62
+ the CLI version), which uses this machine's one `ainecto` sign-in for every agent. Use it only when an
63
+ agent cannot sign in to the server address by itself; running `setup` again without `--local` moves back
64
+ to the server address.
65
+
66
+ Your AiNecto role (your job, set in AiNecto's account settings) is shown by `setup` and `status`; AI uses
67
+ it to pitch explanations — it does not change permissions.
48
68
 
49
69
  ## Set up a repository (optional)
50
70
 
51
71
  ```bash
52
72
  npx -y ainecto@latest init # .ainecto/HARNESS.md, an AGENTS.md block (and CLAUDE.md if present), .ainecto/config.json
53
- npx -y ainecto@latest init --mcp # also .mcp.json (Claude Code) and .cursor/mcp.json (Cursor)
73
+ npx -y ainecto@latest init --mcp # also .mcp.json (Claude Code) and .cursor/mcp.json (Cursor), with the server address
74
+ npx -y ainecto@latest init --mcp --local # the same files with the local relay instead
54
75
  npx -y ainecto@latest init --dry-run # the same plan, nothing written
55
76
  npx -y ainecto@latest init --undo # remove what init wrote
77
+ npx -y ainecto@latest init --agent tester # name the agent working in this folder (see below)
56
78
  ```
57
79
 
80
+ - `--agent <name>` names the agent that works in this folder. It writes the name to
81
+ `.ainecto/agent.local` (keep it out of git) and puts it in `.mcp.json`, `.cursor/mcp.json` and
82
+ `.codex/config.toml` — the server address entries get the header `X-AiNecto-Agent-Name`, the local relay
83
+ gets `--agent <name>`. Re-running `init` keeps the name. `ainecto tools call …` run in this folder sends
84
+ the same name. The server checks the name; a name it refuses stops `init` before any file is written.
85
+ `.codex/config.toml` is written only when it does not exist yet (or init wrote it); Codex reads it only in
86
+ a trusted project.
87
+
58
88
  - `init` fetches the rules from the server — `--dry-run` too, so the plan is the real one. If it cannot
59
89
  (not signed in, offline), it says which files would get this package's default text instead.
60
90
  - If this machine is not signed in yet, `init` opens the browser once (`--dry-run` never does). The
61
91
  sign-in URL is printed first (with `--json`, as one JSON line on stderr: `{"event":"login_url","url":…}`).
62
92
  - It stops when run from a sub-folder of a git repository, and tells you the root.
63
- - **Repositories set up by 0.7.x** (`.mcp.json` with `--role`): re-run `npx -y ainecto@latest init`.
64
- It rewrites the existing `ainecto` entry without `--role`, pinned to this version, and drops the old
65
- `project` field from `.ainecto/config.json` (unless you changed it). Until then the old entry keeps
66
- working: `--role` is accepted and ignored. Old flags (`--role`, `--project`, `--project-name`,
67
- `--yes`) are ignored with a one-line note.
93
+ - `--mcp` writes the server address, like `setup`: `.mcp.json` gets
94
+ `"ainecto": { "type": "http", "url": "https://ainecto.com/mcp" }` (Claude Code needs the `type`) and
95
+ `.cursor/mcp.json` gets `"ainecto": { "url": "https://ainecto.com/mcp" }`. Each agent signs in by
96
+ itself the first time. `--local` writes the pinned local relay instead (see Connector Mode).
97
+ - **Repositories set up earlier** (`.mcp.json` with `npx -y @ainecto/mcp…`, with or without `--role`):
98
+ re-run `npx -y ainecto@latest init`. It rewrites the existing `ainecto` entry to the server address
99
+ (or, with `--local`, to the relay pinned to this version without `--role`), and drops the old
100
+ `project` field from `.ainecto/config.json` (unless you changed it). An `ainecto` entry pointing
101
+ somewhere else is left alone. Until then the old entry keeps working: `--role` is accepted and
102
+ ignored. Old flags (`--role`, `--project`, `--project-name`, `--yes`) are ignored with a one-line note.
68
103
 
69
104
  ## Commands
70
105
 
@@ -167,14 +202,15 @@ The package doubles as a stdio-to-HTTP proxy for the resolved `/mcp` endpoint. I
167
202
  local file references. It uses this machine's one sign-in (`ainecto setup`, `ainecto auth login`, or
168
203
  the sign-in `ainecto init` performs) and never opens a browser on its own.
169
204
 
170
- This is the entry `setup` and `init --mcp` write — you normally do not add it by hand:
205
+ This is the entry `setup --local` and `init --mcp --local` write — you normally do not add it by hand
206
+ (without `--local` they write the server address instead, as above):
171
207
 
172
208
  ```json
173
209
  {
174
210
  "mcpServers": {
175
211
  "ainecto": {
176
212
  "command": "npx",
177
- "args": ["-y", "@ainecto/mcp@0.8.1"]
213
+ "args": ["-y", "@ainecto/mcp@0.10.0"]
178
214
  }
179
215
  }
180
216
  }
@@ -187,18 +223,20 @@ hiding it — `ainecto doctor` checks this.
187
223
 
188
224
  ### MCP Registry
189
225
 
190
- `server.json` is the Registry entry `io.github.codelives/ainecto` (same as `package.json#mcpName`). It
191
- lists only the npm package `@ainecto/mcp` — the bridge `setup` and `init --mcp` write. Registry
226
+ `server.json` is the Registry entry `com.ainecto/mcp` (same as `package.json#mcpName`). It
227
+ lists the server address `https://ainecto.com/mcp` (remote, streamable HTTP — what `setup` registers) and
228
+ the npm package `@ainecto/mcp` (the bridge `setup --local` and `init --mcp --local` write). Registry
192
229
  publication requires the npm version it references to carry that `mcpName`, so publish npm first.
193
230
  Registration is done by a person:
194
231
 
195
232
  1. `npm run release -- --otp=<code>` (below) so that `@ainecto/mcp@<version>` is on npm.
196
- 2. GitHub org namespace login as a `codelives` org **Owner** — a classic PAT with only `read:org`
197
- works where the browser login did not: `MCP_GITHUB_TOKEN=<pat> mcp-publisher login github`.
233
+ 2. Domain login for `ainecto.com` (HTTP: `https://ainecto.com/.well-known/mcp-registry-auth` must
234
+ serve the public key; the private key is in the macOS keychain):
235
+ `mcp-publisher login http --domain ainecto.com --private-key "$(security find-generic-password -s codelive-mcp-registry -a ainecto.com -w)"`.
198
236
  3. `mcp-publisher publish` from this folder.
199
237
 
200
- Listing `https://ainecto.com/mcp` as a remote here, or a `com.ainecto/*` name, would need ainecto.com
201
- domain auth (`mcp-publisher login dns|http --domain ainecto.com`) and is not part of this release.
238
+ Up to 0.8.1 the entry was `io.github.codelives/ainecto` (package only); it is marked deprecated after
239
+ the first `com.ainecto/mcp` publish. Details in `docs/mcp-registry-registration.md`.
202
240
 
203
241
  ## Development
204
242