@novastorm-ai/cli 0.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.
@@ -0,0 +1,70 @@
1
+ import { Command } from 'commander';
2
+ import { IConfigReader, NovaConfig, Observation, TaskItem, LlmClient, IGitManager, EventBus, ProjectMap } from '@novastorm-ai/core';
3
+ import { WebSocketServer } from '@novastorm-ai/proxy';
4
+
5
+ declare class ConfigReader implements IConfigReader {
6
+ read(projectPath: string): Promise<NovaConfig>;
7
+ write(projectPath: string, config: Partial<NovaConfig>): Promise<void>;
8
+ writeLocal(projectPath: string, config: Partial<NovaConfig>): Promise<void>;
9
+ exists(projectPath: string): Promise<boolean>;
10
+ }
11
+
12
+ declare class NovaLogger {
13
+ logObservation(observation: Observation): void;
14
+ logAnalyzing(transcript?: string): void;
15
+ logTasks(tasks: TaskItem[]): void;
16
+ logTaskStarted(task: TaskItem): void;
17
+ logTaskCompleted(task: TaskItem): void;
18
+ logTaskFailed(task: TaskItem): void;
19
+ logFileChanged(filePath: string): void;
20
+ }
21
+
22
+ /**
23
+ * Interactive first-run setup.
24
+ * Asks the user for their preferred provider and API key,
25
+ * saves credentials to .nova/config.toml, and creates nova.toml if missing.
26
+ */
27
+ declare function runSetup(projectPath?: string): Promise<void>;
28
+
29
+ interface ScaffoldInfo {
30
+ scaffolded: boolean;
31
+ frontend?: string;
32
+ backends?: string[];
33
+ }
34
+ /**
35
+ * Prompt the user to select a project template and scaffold it.
36
+ * Returns scaffold info including frontend/backends directories for multi-stack projects.
37
+ */
38
+ declare function promptAndScaffold(projectPath: string): Promise<ScaffoldInfo>;
39
+
40
+ declare class ErrorAutoFixer {
41
+ private readonly projectPath;
42
+ private readonly llmClient;
43
+ private readonly gitManager;
44
+ private readonly eventBus;
45
+ private readonly wsServer;
46
+ private readonly projectMap;
47
+ private isFixing;
48
+ private errorBuffer;
49
+ private debounceTimer;
50
+ private readonly DEBOUNCE_MS;
51
+ private fixAttempts;
52
+ private readonly MAX_FIX_ATTEMPTS;
53
+ private lastErrorSignature;
54
+ private cooldownUntil;
55
+ constructor(projectPath: string, llmClient: LlmClient, gitManager: IGitManager, eventBus: EventBus, wsServer: WebSocketServer, projectMap: ProjectMap);
56
+ /**
57
+ * Process dev server output. Call this for every stdout/stderr chunk.
58
+ */
59
+ handleOutput(output: string): void;
60
+ /** Force an immediate fix attempt, bypassing debounce and pattern check. */
61
+ forceFixNow(errorOutput: string): void;
62
+ private attemptAutoFix;
63
+ private fixImageError;
64
+ private fixCompilationError;
65
+ }
66
+
67
+ declare function createCli(): Command;
68
+ declare function run(argv?: string[]): Promise<void>;
69
+
70
+ export { ConfigReader, ErrorAutoFixer, NovaLogger, createCli, promptAndScaffold, run, runSetup };
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ import {
2
+ ErrorAutoFixer,
3
+ NovaLogger,
4
+ createCli,
5
+ promptAndScaffold,
6
+ run
7
+ } from "./chunk-NFNZMCLQ.js";
8
+ import {
9
+ ConfigReader,
10
+ runSetup
11
+ } from "./chunk-FYSTZ6K6.js";
12
+ import "./chunk-3RG5ZIWI.js";
13
+ export {
14
+ ConfigReader,
15
+ ErrorAutoFixer,
16
+ NovaLogger,
17
+ createCli,
18
+ promptAndScaffold,
19
+ run,
20
+ runSetup
21
+ };
@@ -0,0 +1,43 @@
1
+ import "./chunk-3RG5ZIWI.js";
2
+
3
+ // package.json
4
+ var package_default = {
5
+ name: "@novastorm-ai/cli",
6
+ publishConfig: { access: "public" },
7
+ version: "0.0.1",
8
+ license: "SEE LICENSE IN LICENSE.md",
9
+ type: "module",
10
+ main: "dist/index.js",
11
+ types: "dist/index.d.ts",
12
+ bin: {
13
+ nova: "dist/bin/nova.js"
14
+ },
15
+ exports: {
16
+ ".": {
17
+ types: "./dist/index.d.ts",
18
+ import: "./dist/index.js"
19
+ }
20
+ },
21
+ scripts: {
22
+ build: "tsup",
23
+ lint: "tsc --noEmit"
24
+ },
25
+ dependencies: {
26
+ "@iarna/toml": "^2.2.5",
27
+ "@inquirer/prompts": "^8.3.2",
28
+ "@novastorm-ai/core": "workspace:*",
29
+ "@novastorm-ai/licensing": "workspace:*",
30
+ "@novastorm-ai/proxy": "workspace:*",
31
+ chalk: "^5.6.2",
32
+ commander: "^14.0.3",
33
+ inquirer: "^13.3.2",
34
+ ora: "^9.3.0"
35
+ },
36
+ devDependencies: {
37
+ tsup: "^8.4.0",
38
+ typescript: "^5.7.0"
39
+ }
40
+ };
41
+ export {
42
+ package_default as default
43
+ };
@@ -0,0 +1,7 @@
1
+ import {
2
+ runSetup
3
+ } from "./chunk-FYSTZ6K6.js";
4
+ import "./chunk-3RG5ZIWI.js";
5
+ export {
6
+ runSetup
7
+ };
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@novastorm-ai/cli",
3
+ "publishConfig": {"access": "public"},
4
+ "version": "0.0.1",
5
+ "license": "SEE LICENSE IN LICENSE.md",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "bin": {
10
+ "nova": "dist/bin/nova.js"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ }
17
+ },
18
+ "scripts": {
19
+ "build": "tsup",
20
+ "lint": "tsc --noEmit"
21
+ },
22
+ "dependencies": {
23
+ "@iarna/toml": "^2.2.5",
24
+ "@inquirer/prompts": "^8.3.2",
25
+ "@novastorm-ai/core": "workspace:*",
26
+ "@novastorm-ai/licensing": "workspace:*",
27
+ "@novastorm-ai/proxy": "workspace:*",
28
+ "chalk": "^5.6.2",
29
+ "commander": "^14.0.3",
30
+ "inquirer": "^13.3.2",
31
+ "ora": "^9.3.0"
32
+ },
33
+ "devDependencies": {
34
+ "tsup": "^8.4.0",
35
+ "typescript": "^5.7.0"
36
+ }
37
+ }