nexgenr 1.0.0 → 1.0.1

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.
Files changed (3) hide show
  1. package/README.md +28 -13
  2. package/dist/main.mjs +3 -12
  3. package/package.json +9 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # nexgenr
2
2
 
3
- NexgenR CLI is a terminal AI coding agent wired to **NexgenRouter**.
3
+ NexgenR CLI is a terminal AI coding agent wired to the **NexgenR red-team** surface.
4
4
 
5
5
  ## Install
6
6
 
@@ -18,22 +18,33 @@ pnpm add -g nexgenr
18
18
 
19
19
  ## Configure
20
20
 
21
- NexgenR authenticates with a NexgenRouter API key:
21
+ NexgenR signs in with an API key. There is no OAuth and no device flow:
22
22
 
23
23
  ```sh
24
24
  export NEXGENR_API_KEY="<your key>"
25
- # optional, defaults to https://ia.nexgen.systems/v1
26
- export NEXGENR_BASE_URL="https://ia.nexgen.systems/v1"
25
+ # optional, defaults to https://redteam.nexgen.systems/v1
26
+ export NEXGENR_BASE_URL="https://redteam.nexgen.systems/v1"
27
27
  ```
28
28
 
29
- Validate the key and provision the model catalog:
30
-
31
29
  ```sh
32
30
  nexgenr login # reads NEXGENR_API_KEY
33
31
  nexgenr login --api-key <your key> # or pass it explicitly
34
32
  ```
35
33
 
36
- This reads `GET /v1/models`, writes `~/.nexgenr/config.toml`, and selects `nexgen-auto` as the default model.
34
+ The same key works on both surfaces; the header is what changes:
35
+
36
+ | Surface | Send the key as | Rejected |
37
+ |---|---|---|
38
+ | `/v1/…` inference and catalog | `Authorization: Bearer <key>` or `x-api-key: <key>` | `x-bf-vk` answers 401 here |
39
+ | `/mcp` gateway | `x-bf-vk: <key>` or `Authorization: Bearer <key>` | — |
40
+
41
+ The key must be provisioned for the `vllm` provider and the `nexgen-redteam` model.
42
+ Without that grant `GET /v1/models` answers 200 with an empty catalog and chat fails
43
+ with `400 modelo-desconocido`.
44
+
45
+ `nexgenr login` writes `~/.nexgenr/config.toml` with the `redteam` provider and its single
46
+ model `nexgen-redteam` (262 144 tokens of context), and `~/.nexgenr/mcp.json` with the
47
+ gateway. It does not call the catalog: the model list is static.
37
48
 
38
49
  ## Quick start
39
50
 
@@ -47,13 +58,17 @@ nexgenr # interactive terminal UI
47
58
 
48
59
  | Capability | Endpoint |
49
60
  |---|---|
50
- | Chat (OpenAI, Responses, Anthropic) | `POST /v1/chat/completions`, `/v1/responses`, `/v1/messages` |
61
+ | Chat, streaming only | `POST /v1/chat/completions` |
51
62
  | Model catalog | `GET /v1/models` |
52
- | Web search | `POST /v1/tools/search` |
53
- | URL fetch | `POST /v1/tools/fetch` |
54
- | Server tools | `openrouter:*` declared in `tools[]` |
63
+ | Health and published limits | `GET /health`, no credential |
64
+ | MCP gateway | `POST /mcp` — 24 tools (8 Brave_Search, 16 Crawl4AI) |
65
+
66
+ `POST /v1/completions` and `POST /v1/embeddings` are in the edge allowlist but the engine
67
+ answers 404: `POST /v1/chat/completions` is the only inference route.
55
68
 
56
- Authentication uses `Authorization: Bearer <key>` (and `x-api-key` on the Anthropic wire).
69
+ Limits, as published by `GET /health`: 4 requests in flight per consumer with `429` and
70
+ `Retry-After: 10` beyond that, a 12 MiB request body, and 262 144 tokens of context. A
71
+ prefill can take minutes, so requests stream and wait up to 3 600 s for the first byte.
57
72
 
58
73
  ## Features
59
74
 
@@ -68,7 +83,7 @@ Authentication uses `Authorization: Bearer <key>` (and `x-api-key` on the Anthro
68
83
  - Remote Control (requires a relay service).
69
84
  - CDN-based auto-update; upgrade with `npm install -g nexgenr@latest`.
70
85
  - The bundled browser UI; `nexgenr web` serves the API plus a minimal landing page.
71
- - Device-flow OAuth; `nexgenr login` validates an API key and writes the provider entry.
86
+ - SSO: NexgenR signs in with an API key only.
72
87
 
73
88
  ## License
74
89
 
package/dist/main.mjs CHANGED
@@ -323009,9 +323009,6 @@ init_src$8();
323009
323009
  init_mcp_provision();
323010
323010
  init_provision();
323011
323011
  const PROBE_TIMEOUT_MS$1 = 15e3;
323012
- function isVirtualKey(key) {
323013
- return key !== void 0 && key.startsWith("sk-bf-");
323014
- }
323015
323012
  function mcpHeaders(apiKey) {
323016
323013
  if (apiKey === void 0 || apiKey === "") return {};
323017
323014
  const headers = redteamAuthHeaders(apiKey);
@@ -323080,21 +323077,15 @@ async function probeModels(doFetch, baseUrl, apiKey, timeoutMs) {
323080
323077
  detail: "no API key in config.toml — run `nexgenr login --api-key <token>`"
323081
323078
  };
323082
323079
  try {
323083
- const headers = redteamAuthHeaders(apiKey);
323084
323080
  const response = await timedFetch(doFetch, `${baseUrl}/models`, {
323085
323081
  method: "GET",
323086
- headers
323082
+ headers: { authorization: `Bearer ${apiKey}` }
323087
323083
  }, timeoutMs);
323088
- if (response.status === 401 || response.status === 403) return isVirtualKey(apiKey) ? {
323089
- name: "models",
323090
- kind: "probe",
323091
- state: "BLOQUEADO",
323092
- detail: `HTTP ${response.status} — a Bifrost virtual key cannot use /v1; the consumer token (64 hex) is a different credential`
323093
- } : {
323084
+ if (response.status === 401 || response.status === 403) return {
323094
323085
  name: "models",
323095
323086
  kind: "probe",
323096
323087
  state: "DENEGADO",
323097
- detail: `HTTP ${response.status} — the consumer token was rejected`
323088
+ detail: `HTTP ${response.status} — the credential was rejected on /v1`
323098
323089
  };
323099
323090
  if (!response.ok) return {
323100
323091
  name: "models",
package/package.json CHANGED
@@ -1,10 +1,17 @@
1
1
  {
2
2
  "name": "nexgenr",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "NexgenR — terminal AI coding agent",
5
5
  "license": "MIT",
6
6
  "author": "NexgenR",
7
- "homepage": "https://ia.nexgen.systems",
7
+ "homepage": "https://git.nexgen.systems/IANexgen/NexgenR",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://git.nexgen.systems/IANexgen/NexgenR.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://git.nexgen.systems/IANexgen/NexgenR/issues"
14
+ },
8
15
  "keywords": [
9
16
  "nexgenr",
10
17
  "cli",