airgen-cli 0.11.0 → 0.12.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/dist/client.d.ts CHANGED
@@ -8,6 +8,7 @@ export interface ClientConfig {
8
8
  apiUrl: string;
9
9
  email: string;
10
10
  password: string;
11
+ apiKey?: string;
11
12
  }
12
13
  export declare class AirgenClient {
13
14
  private config;
package/dist/client.js CHANGED
@@ -189,6 +189,12 @@ export class AirgenClient {
189
189
  }
190
190
  // ── Auth ──────────────────────────────────────────────────────
191
191
  async ensureAuth() {
192
+ // API key mode — no login needed
193
+ if (this.config.apiKey) {
194
+ this.auth.accessToken = this.config.apiKey;
195
+ this.auth.tokenExpiresAt = Infinity;
196
+ return;
197
+ }
192
198
  // Already have a valid token (with 2min buffer)
193
199
  if (this.auth.accessToken && Date.now() < this.auth.tokenExpiresAt - 120_000) {
194
200
  return;
@@ -66,17 +66,25 @@ export function registerProjectCommands(program, client) {
66
66
  { name: "System Requirements", code: "SYS", sections: [
67
67
  { name: "System Requirements", code: "SYS" },
68
68
  ] },
69
+ { name: "Interface Requirements", code: "IFC", sections: [
70
+ { name: "Interface Requirements", code: "IFC" },
71
+ ] },
69
72
  { name: "Subsystem Requirements", code: "SUB", sections: [
70
73
  { name: "Subsystem Requirements", code: "SUB" },
71
74
  ] },
75
+ { name: "Architecture Decisions", code: "ARC", sections: [
76
+ { name: "Architecture Decisions", code: "ARC" },
77
+ ] },
72
78
  { name: "Verification Requirements", code: "VER", sections: [
73
79
  { name: "Verification Requirements", code: "VER" },
74
80
  ] },
75
81
  ];
76
82
  const seLinksets = [
77
83
  { source: "stakeholder-requirements", target: "system-requirements" },
84
+ { source: "system-requirements", target: "interface-requirements" },
78
85
  { source: "system-requirements", target: "subsystem-requirements" },
79
86
  { source: "system-requirements", target: "verification-requirements" },
87
+ { source: "interface-requirements", target: "verification-requirements" },
80
88
  { source: "subsystem-requirements", target: "verification-requirements" },
81
89
  ];
82
90
  const safetyExtras = [
package/dist/config.d.ts CHANGED
@@ -5,5 +5,6 @@ export interface CliConfig {
5
5
  apiUrl: string;
6
6
  email: string;
7
7
  password: string;
8
+ apiKey?: string;
8
9
  }
9
10
  export declare function loadConfig(): CliConfig;
package/dist/config.js CHANGED
@@ -16,15 +16,16 @@ function loadRcFile() {
16
16
  export function loadConfig() {
17
17
  const rc = loadRcFile();
18
18
  const apiUrl = process.env.AIRGEN_API_URL ?? rc.apiUrl;
19
- const email = process.env.AIRGEN_EMAIL ?? rc.email;
20
- const password = process.env.AIRGEN_PASSWORD ?? rc.password;
19
+ const apiKey = process.env.AIRGEN_API_KEY ?? rc.apiKey;
20
+ const email = process.env.AIRGEN_EMAIL ?? rc.email ?? "";
21
+ const password = process.env.AIRGEN_PASSWORD ?? rc.password ?? "";
21
22
  if (!apiUrl) {
22
23
  console.error("Missing AIRGEN_API_URL. Set it via environment variable or ~/.airgenrc");
23
24
  process.exit(1);
24
25
  }
25
- if (!email || !password) {
26
- console.error("Missing AIRGEN_EMAIL / AIRGEN_PASSWORD. Set via environment or ~/.airgenrc");
26
+ if (!apiKey && (!email || !password)) {
27
+ console.error("Missing credentials. Set AIRGEN_API_KEY or AIRGEN_EMAIL + AIRGEN_PASSWORD via environment or ~/.airgenrc");
27
28
  process.exit(1);
28
29
  }
29
- return { apiUrl, email, password };
30
+ return { apiUrl, email, password, apiKey };
30
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airgen-cli",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "AIRGen CLI — requirements engineering from the command line",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",