iaurora 1.0.0 → 1.0.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 CHANGED
@@ -24,7 +24,7 @@ Self-hosted. No vendor lock-in. Full source visibility.
24
24
  </tr>
25
25
  <tr>
26
26
  <td><a href="https://github.com/gurveeer/Aurora/pulls"><img src="https://img.shields.io/badge/PRs-Welcome-brightgreen?style=flat-square" alt="PRs Welcome"></a></td>
27
- <td><a href="https://discord.gg/gaEB9BQSPH"><img src="https://img.shields.io/badge/Discord-Join-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord"></a></td>
27
+ <td><a href="https://discord.gg/YJPrfR9uh"><img src="https://img.shields.io/badge/Discord-Join-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord"></a></td>
28
28
  <td></td>
29
29
  <td></td>
30
30
  </tr>
@@ -38,7 +38,7 @@ Self-hosted. No vendor lock-in. Full source visibility.
38
38
 
39
39
  ---
40
40
 
41
- ## Get running in 30 seconds
41
+ ## Start your selfhosted gateway
42
42
 
43
43
  **Docker**
44
44
 
@@ -99,6 +99,76 @@ Aurora sits between your application and AI providers. One API key, one endpoint
99
99
 
100
100
  ---
101
101
 
102
+ ## Publish readiness and boundaries
103
+
104
+ This repository is intended to be published as the **Aurora OSS source tree**. It should contain source code, tests, examples, generated OpenAPI/docs assets, and public documentation only.
105
+
106
+ **Current review status:** source publish is acceptable after the checks below pass locally. Do not publish any local runtime files, compiled binaries, package tarballs, databases, logs, or machine-specific configuration.
107
+
108
+ ### Repository boundary
109
+
110
+ Included in the OSS boundary:
111
+
112
+ - Gateway source under `apps/`, `internal/`, `configuration/`, and supporting packages.
113
+ - Dashboard source under `dashboard-ui/` and minimal embedded dashboard placeholders needed by Go builds.
114
+ - Public config examples under `configs/`, `configuration/`, `helm/`, `.env.template`, and docs.
115
+ - Tests under `test/` and public fixtures with dummy credentials only.
116
+ - CI, release, Docker, Helm, and packaging scripts.
117
+
118
+ Excluded from the OSS boundary:
119
+
120
+ - Local environment files: `.env`, `.env.*`, `.aurora.local/`.
121
+ - Runtime data: `data/`, logs, caches, SQLite files, benchmark output, and temporary files.
122
+ - Build/package output: `bin/`, `dist/`, `release/`, `npm/`, `*.exe`, `*.tgz`, archives.
123
+ - User/editor/agent config that may contain private paths or endpoints: `.vscode/`, `.idea/`, `opencode.json`, `.claude/settings.local.json`.
124
+ - Any provider API key, database URL, Redis URL, vector DB token, private certificate/key, or managed API key.
125
+
126
+ ### Leakage review summary
127
+
128
+ The publish tree was checked for common leakage classes:
129
+
130
+ - Hardcoded provider keys and service tokens.
131
+ - Live Redis/PostgreSQL/Qdrant connection strings.
132
+ - Private certificates and key material.
133
+ - Local absolute paths and machine-specific `.aurora.local` files.
134
+ - Generated binaries and package archives.
135
+
136
+ Local secret-bearing files and generated binaries/package artifacts were removed from the publish tree. Remaining credential-like strings found by the review are dummy examples in docs/tests, such as `sk-test-key-12345`, `postgres://user:pass@localhost/...`, or placeholders in `.env.template`.
137
+
138
+ ### Security posture
139
+
140
+ - Keep `AURORA_MASTER_KEY` unset only for isolated local testing. Set a high-entropy value before exposing the gateway outside localhost.
141
+ - Keep `LOGGING_LOG_BODIES=false` and `LOGGING_LOG_HEADERS=false` unless you explicitly need request debugging and understand the privacy impact.
142
+ - Use `.env.template` as documentation only. Put real values in untracked `.env` files, deployment secrets, or your hosting provider's secret manager.
143
+ - Rotate any credential that was ever present in a local `.env`, `.aurora.local`, package artifact, shell history, or shared archive before public release.
144
+ - Audit logs hash API keys for identification and redact sensitive headers in reader paths, but request/response body logging can still capture sensitive prompts if enabled.
145
+
146
+ ### Pre-publish checklist
147
+
148
+ Run these from the repository root before creating a fresh GitHub repository:
149
+
150
+ ```bash
151
+ # Verify no local runtime secrets or build artifacts are present
152
+ find . -maxdepth 3 \( -name .env -o -name '.env.*' -o -name '.aurora.local' -o -name '*.exe' -o -name '*.tgz' -o -name '*.pem' -o -name '*.db' \) -print
153
+
154
+ # Search for common secret patterns. Review every match manually.
155
+ rg -n --hidden -g '!node_modules' -g '!dashboard-ui/node_modules' -g '!*.png' -g '!*.jpg' -g '!*.lock' \
156
+ '(rediss://|postgres://[^[:space:]"'"'']+:[^[:space:]"'"'']+@|BEGIN (RSA |EC |OPENSSH |)PRIVATE KEY|[A-Z0-9_]*API_KEY\s*=\s*(sk-|gsk_|jina_|eyJ|[A-Za-z0-9_-]{20,}))'
157
+
158
+ # Build and test source
159
+ pnpm --dir dashboard-ui install
160
+ pnpm --dir dashboard-ui run build
161
+ go test ./apps/... ./internal/...
162
+ ```
163
+
164
+ Expected result for the first command is no output, except intentionally kept public templates. Expected result for the secret search is only placeholders, dummy test keys, or documentation examples.
165
+
166
+ ### If a secret was exposed
167
+
168
+ If a real key was committed locally, copied into a package artifact, or shared outside your machine, deleting the file is not enough. Revoke and rotate the credential at the provider, purge generated artifacts, and create the public GitHub repository from a clean tree with no inherited history.
169
+
170
+ ---
171
+
102
172
  ## Providers
103
173
 
104
174
  | Provider | Key | Chat | Embeddings | Files | Batches | Passthrough |
@@ -127,18 +197,18 @@ Aurora sits between your application and AI providers. One API key, one endpoint
127
197
  Aurora loads config in order: **defaults → YAML → env vars** (env vars win).
128
198
 
129
199
  ```bash
130
- # Copy the template
200
+ # Copy the env template for secrets/runtime values
131
201
  cp .env.template .env
132
202
 
133
- # Pick a config profile
134
- cp configs/editions/oss.example.yaml configs/config.yaml
203
+ # Pick a config profile. Env vars in .env override YAML values.
204
+ export AURORA_CONFIG_PATH=configs/editions/oss.example.yaml
135
205
  ```
136
206
 
137
207
  | Profile | Best for | External services |
138
208
  |---|---|---|
139
209
  | [`oss.example.yaml`](configs/editions/oss.example.yaml) | First run, individual devs | None |
140
- | [`oss.local-power.example.yaml`](configs/editions/oss.local-power.example.yaml) | Local power users (cache, metrics, audit) | Redis |
141
- | [`oss.team.example.yaml`](configs/editions/oss.team.example.yaml) | Small self-hosted teams | PostgreSQL, Redis, Qdrant |
210
+ | [`oss.local-power.example.yaml`](configs/editions/oss.local-power.example.yaml) | Local power users with audit, usage, metrics, exact cache, guardrail examples, token saver examples | Redis |
211
+ | [`oss.team.example.yaml`](configs/editions/oss.team.example.yaml) | Full OSS team profile with Postgres storage, Redis model/exact cache, semantic cache, provider examples, pools, fallback, resilience | PostgreSQL, Redis, Qdrant or another vector store |
142
212
 
143
213
  **Key settings:**
144
214
 
@@ -151,6 +221,9 @@ cp configs/editions/oss.example.yaml configs/config.yaml
151
221
  | `METRICS_ENABLED` | `false` | Prometheus metrics |
152
222
  | `GUARDRAILS_ENABLED` | `false` | Guardrail workflows |
153
223
  | `ENABLE_PASSTHROUGH_ROUTES` | `true` | `/p/{provider}/...` passthrough |
224
+ | `TOKEN_SAVER_ENABLED` | `false` | Optional concise-output/token-saving transforms |
225
+ | `RESPONSE_CACHE_SIMPLE_ENABLED` | `false` unless configured in YAML | Redis exact response cache |
226
+ | `SEMANTIC_CACHE_ENABLED` | `false` unless configured in YAML | Embedding + vector-store semantic response cache |
154
227
 
155
228
  Full reference: [`configs/config.example.yaml`](configs/config.example.yaml)
156
229
 
@@ -207,7 +280,6 @@ Outputs: `bin/aurora-oss.exe`, `release/aurora-oss-windows-amd64.zip`
207
280
  ```bash
208
281
  go test ./apps/... ./internal/...
209
282
  pnpm --dir dashboard-ui run build
210
- make oss-boundary-check
211
283
  ```
212
284
 
213
285
  ---
@@ -224,7 +296,7 @@ The Enterprise edition is a separate distribution. It cannot be enabled by editi
224
296
 
225
297
  | | |
226
298
  |---|---|
227
- | [Discord](https://discord.gg/gaEB9BQSPH) | Deployment questions, provider setup, roadmap |
299
+ | [Discord](https://discord.gg/YJPrfR9uh) | Deployment questions, provider setup, roadmap |
228
300
  | [GitHub Issues](https://github.com/gurveeer/Aurora/issues) | Bug reports, feature requests |
229
301
  | [GitHub Stars](https://github.com/gurveeer/Aurora/stargazers) | Support the project |
230
302
 
package/bin/aurora.exe CHANGED
Binary file
package/bin/aurora.js CHANGED
@@ -1,122 +1,105 @@
1
1
  #!/usr/bin/env node
2
- import { spawn } from 'child_process';
2
+
3
3
  import { existsSync } from 'fs';
4
- import { createRequire } from 'module';
4
+ import { spawnSync } from 'child_process';
5
5
  import { resolve, dirname } from 'path';
6
6
  import { fileURLToPath } from 'url';
7
+ import { createRequire } from 'module';
7
8
  import os from 'os';
8
9
 
9
- const __dirname = dirname(fileURLToPath(import.meta.url));
10
+ const __filename = fileURLToPath(import.meta.url);
11
+ const __dirname = dirname(__filename);
10
12
  const require = createRequire(import.meta.url);
11
- const pkg = require(resolve(__dirname, '..', 'package.json'));
12
-
13
- function platformBinaryName() {
14
- const ext = os.platform() === 'win32' ? '.exe' : '';
15
- return `aurora${ext}`;
16
- }
17
13
 
18
- function resolveBinary() {
19
- const name = platformBinaryName();
14
+ // Try multiple locations for the binary, in priority order
15
+ function findBinary() {
20
16
  const candidates = [
21
- process.env.AURORA_BINARY_PATH && resolve(process.env.AURORA_BINARY_PATH),
22
- resolve(__dirname, name),
23
- resolve(__dirname, '..', name),
24
- resolve(__dirname, '..', 'bin', name),
25
- resolve(os.homedir(), '.aurora', 'bin', name),
26
- resolve(os.homedir(), '.cache', 'aurora', name),
27
- ].filter(Boolean);
28
-
29
- for (const candidate of candidates) {
30
- if (existsSync(candidate)) return candidate;
17
+ // Downloaded by postinstall to ~/.aurora/bin/
18
+ resolve(os.homedir(), '.aurora', 'bin', os.platform() === 'win32' ? 'aurora.exe' : 'aurora'),
19
+ // Bundled alongside the JS wrapper
20
+ resolve(__dirname, 'aurora.exe'),
21
+ resolve(__dirname, 'aurora'),
22
+ // Project-local build
23
+ resolve(process.cwd(), 'bin', 'aurora-oss.exe'),
24
+ resolve(process.cwd(), 'bin', 'aurora.exe'),
25
+ resolve(process.cwd(), 'bin', 'aurora'),
26
+ ];
27
+
28
+ for (const path of candidates) {
29
+ if (existsSync(path)) {
30
+ return path;
31
+ }
31
32
  }
32
33
  return null;
33
34
  }
34
35
 
35
- function suggestInstall() {
36
- console.error(`
37
- Aurora binary not found.
38
-
39
- Run: npx iaurora install
40
-
41
- Or build manually (requires Go 1.26.2+):
42
- git clone https://github.com/gurveeer/Aurora.git
43
- cd Aurora
44
- go build -o bin/aurora ./apps/aurora
45
- set AURORA_BINARY_PATH to the binary path
46
-
47
- `);
48
- process.exit(1);
36
+ function printHelp() {
37
+ console.log(`
38
+ Aurora AI Gateway — CLI
39
+ One API for every LLM provider. Self-hosted, open-source.
40
+
41
+ USAGE
42
+ npx iaurora <command>
43
+
44
+ COMMANDS
45
+ help Show this help
46
+ install Download the Aurora binary for your platform
47
+ start Start the gateway (requires config setup)
48
+ version Show version
49
+
50
+ SETUP
51
+ 1. npx iaurora install # Download the binary
52
+ 2. cp .env.template .env # Configure your environment
53
+ 3. npx iaurora start # Start the gateway
54
+
55
+ ENVIRONMENT VARIABLES
56
+ Copy .env.template to .env and set at least:
57
+ - AURORA_MASTER_KEY # Gateway security key
58
+ - AURORA_CONFIG_PATH # Path to config YAML (e.g. configs/editions/oss.example.yaml)
59
+ - OPENAI_API_KEY # At least one provider key
60
+
61
+ Docs: https://github.com/gurveeer/Aurora#readme
62
+ `.trim());
49
63
  }
50
64
 
51
- function run(args) {
52
- const binary = resolveBinary();
53
- if (!binary) {
54
- if (args[0] === 'install' || args[0] === 'download') {
55
- downloadBinary(args.slice(1));
56
- return;
57
- }
58
- if (args[0] === '--help' || args[0] === '-h') {
59
- printHelp();
60
- return;
61
- }
62
- suggestInstall();
63
- return;
64
- }
65
+ async function main() {
66
+ const args = process.argv.slice(2);
67
+ const cmd = args[0] || 'help';
65
68
 
66
- if (args[0] === '--help' || args[0] === '-h') {
69
+ if (cmd === 'help' || cmd === '--help' || cmd === '-h') {
67
70
  printHelp();
68
- return;
71
+ process.exit(0);
69
72
  }
70
73
 
71
- const child = spawn(binary, args, {
72
- stdio: 'inherit',
73
- env: { ...process.env },
74
- });
75
-
76
- child.on('exit', (code) => process.exit(code ?? 1));
77
- child.on('error', (err) => {
78
- console.error('Failed to start binary:', err.message);
79
- process.exit(1);
80
- });
81
- }
82
-
83
- function printHelp() {
84
- console.error(`
85
- ${pkg.name} v${pkg.version}
86
-
87
- Usage: npx ${pkg.name} [command] [options]
88
-
89
- Commands:
90
- start Start the Aurora gateway server (default)
91
- install Download the Aurora binary for your platform
92
- models sync Sync model registry from upstream
93
- models diff Compare local vs upstream model pricing
94
- models show Show model pricing details
95
- --help, -h Show this help
96
- --version, -v Show version
97
-
98
- Environment:
99
- AURORA_BINARY_PATH Path to the Aurora binary (bypasses search)
100
- AURORA_CONFIG_PATH Path to config YAML (default: configs/editions/oss.example.yaml)
101
-
102
- Documentation: https://github.com/gurveeer/Aurora
103
- `);
104
- process.exit(0);
105
- }
74
+ if (cmd === 'version' || cmd === '--version' || cmd === '-v') {
75
+ const binary = findBinary();
76
+ if (binary) {
77
+ const result = spawnSync(binary, ['-version'], { stdio: 'inherit' });
78
+ process.exit(result.status ?? 0);
79
+ }
80
+ const pkg = require(resolve(__dirname, '..', 'package.json'));
81
+ console.log(pkg.version);
82
+ process.exit(0);
83
+ }
106
84
 
107
- async function downloadBinary(args) {
108
- const { downloadAndInstall } = await import('../scripts/npm-postinstall.js');
109
- try {
110
- await downloadAndInstall({
111
- force: args.includes('--force'),
112
- });
113
- console.error('Binary installed to ~/.aurora/bin/');
114
- console.error('Run `npx iaurora start` to launch the server.');
85
+ if (cmd === 'install') {
86
+ const { downloadAndInstall } = await import(resolve(__dirname, '..', 'scripts', 'npm-postinstall.js'));
87
+ await downloadAndInstall({ force: true });
115
88
  process.exit(0);
116
- } catch (err) {
117
- console.error('Download failed:', err.message);
89
+ }
90
+
91
+ const binary = findBinary();
92
+ if (!binary) {
93
+ console.error('Aurora binary not found.');
94
+ console.error('Run `npx iaurora install` to download it, or build it with `go build -o bin/aurora.exe ./apps/aurora`.');
118
95
  process.exit(1);
119
96
  }
97
+
98
+ const result = spawnSync(binary, args, { stdio: 'inherit' });
99
+ process.exit(result.status ?? 0);
120
100
  }
121
101
 
122
- run(process.argv.slice(2));
102
+ main().catch(err => {
103
+ console.error(err);
104
+ process.exit(1);
105
+ });
package/config.yaml CHANGED
@@ -1,6 +1,8 @@
1
1
  # Aurora OSS minimal local profile
2
2
  # Usage: $env:AURORA_CONFIG_PATH = "configs/editions/oss.example.yaml"; go run ./apps/aurora
3
- # Goal: start with no external dependencies. Use provider env vars such as OPENAI_API_KEY or GROQ_API_KEY.
3
+ # Goal: start with no external dependencies. Use provider env vars such as OPENAI_API_KEY or GROQ_API_KEY.
4
+ # Config pipeline: defaults -> this YAML -> env vars. Env vars always win.
5
+ # Do not put real provider keys in this file.
4
6
 
5
7
  edition:
6
8
  name: oss
@@ -18,10 +20,11 @@ admin:
18
20
  ui_enabled: true
19
21
  dashboard_variant: "react"
20
22
 
21
- models:
22
- enabled_by_default: true
23
- overrides_enabled: true
24
- configured_provider_models_mode: "fallback"
23
+ models:
24
+ enabled_by_default: true
25
+ overrides_enabled: true
26
+ keep_only_aliases_at_models_endpoint: false
27
+ configured_provider_models_mode: "fallback"
25
28
 
26
29
  storage:
27
30
  type: "sqlite"
@@ -47,9 +50,35 @@ guardrails:
47
50
  enabled: false
48
51
  enable_for_batch_processing: false
49
52
 
50
- cache:
51
- model:
52
- refresh_interval: 3600
53
-
54
- workflows:
55
- refresh_interval: 1m
53
+ cache:
54
+ model:
55
+ refresh_interval: 3600
56
+ model_list:
57
+ url: ""
58
+ local_path: "data/models.local.json"
59
+ user_overrides_path: "data/user_pricing.yaml"
60
+ local:
61
+ cache_dir: ".cache"
62
+
63
+ combos:
64
+ enabled: true
65
+
66
+ cli_tools:
67
+ enabled: true
68
+ apply_enabled: false
69
+
70
+ token_saver:
71
+ enabled: false
72
+ endpoints: ["chat_completions"]
73
+ apply_streaming: true
74
+ output:
75
+ enabled: false
76
+ profile: "concise"
77
+ level: "full"
78
+ on_error: "allow"
79
+ emit_headers: true
80
+ audit:
81
+ enabled: true
82
+
83
+ workflows:
84
+ refresh_interval: 1m
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0",
2
+ "version": "1.0.2",
3
3
  "author": "SantiagoDePolonia",
4
4
  "license": "Apache-2.0",
5
5
  "files": [