Skip to content

Commit 9295005

Browse files
committed
feat: improve readme, disable auto-release
- temorary disable auto-release in release gh action - describe currently not working buliding in docker - improve building and running instructions in readme - bump verison - improve bulid script and dockerfile
1 parent ca53e86 commit 9295005

File tree

5 files changed

+34
-17
lines changed

5 files changed

+34
-17
lines changed

.github/workflows/release.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
tags:
66
- "v*.*.*"
7+
branches:
8+
- "temp-disabled" # building is suspended because it currently produces output with errors in runtime
79

810
jobs:
911
build:

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ FROM oven/bun:1.1.30
33
WORKDIR /app
44

55
# Copy package management files
6-
COPY package.json bun.lockb* ./
6+
COPY package.json ./
7+
COPY bun.lockb ./
78

89
# Install dependencies
910
RUN bun install --frozen-lockfile

README.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,11 @@ The agent will interpret your request, execute the necessary commands, and provi
142142
#### Building on local machine
143143

144144
To compile the AI Console Agent into a standalone executable with source maps, follow these steps:
145-
This project requires Bun version 1.1.30. Compilation with lower versions may have some problems.
146145

147-
1. Ensure all project dependencies are installed:
146+
1. Ensure Bun is installed. If not, install it using:
148147

149148
```
150-
bun install
149+
curl -fsSL https://bun.sh/install | bash
151150
```
152151

153152
2. Run the build script:
@@ -162,10 +161,12 @@ This project requires Bun version 1.1.30. Compilation with lower versions may ha
162161
Build completed successfully. Executable: /path/to/ai-console-agent/dist/ai-console-agent
163162
```
164163

165-
4. The compiled executable will be created in the `dist` directory as `ai-console-agent`, along with source map files.
164+
The compiled executable will be created in the `dist` directory as `ai-console-agent`.
166165

167166
#### Building in Docker
168167

168+
> **Note**: Building in Docker is currently not working and is a work in progress. The following steps are provided for reference but may not function as expected. We are actively working on resolving this issue.
169+
169170
1. Build the Docker image:
170171

171172
```
@@ -200,10 +201,14 @@ After successful compilation, run the AI Console Agent using:
200201
./dist/ai-console-agent "Your command here"
201202
```
202203

204+
Remember to use the double quotes around your command to avoid issues with special characters in you message.
205+
203206
This executable includes all necessary dependencies and can be distributed as a standalone program.
204207

205208
### Release Process for Developers
206209

210+
> **Note**: The automatic release process for this app via GitHub Actions is currently suspended due to critical errors in the build process of Bun. The executable produced by the GitHub Actions workflow contains a critical error that prevents the application from functioning correctly. As a result, only manual building is working at the moment. The release process described below is temporarily on hold until these issues are resolved.
211+
207212
To create a new release:
208213

209214
1. Ensure all changes are committed and pushed to the main branch.
@@ -237,7 +242,7 @@ Read about it here: https://bun.sh/docs/bundler/executables
237242

238243
If you encounter errors related to missing packages during compilation, follow these steps:
239244

240-
1. Identify the missing packages from the error messages. Common missing packages might include:
245+
1. Identify the missing packages from the error messages. For example these were such problem packages (currently already included in dev deps, so theyre not a problem anymore):
241246

242247
- pg
243248
- @xenova/transformers
@@ -255,7 +260,7 @@ If you encounter errors related to missing packages during compilation, follow t
255260
bun add -d pg @xenova/transformers pgvector
256261
```
257262

258-
3. Update your `package.json` to include these as dev dependencies:
263+
3. Look that your `package.json` is updated to include these as dev dependencies:
259264

260265
```json
261266
{
@@ -280,7 +285,10 @@ If you encounter errors related to missing packages during compilation, follow t
280285

281286
Note: This issue may occur if there are changes in the `llamaindex` package or its dependencies. Always check for updates and be prepared to add new dev dependencies as needed.
282287

283-
### Development Run
288+
Currently adding such packages as dev deps resolves the issue with building project in a single executable.
289+
The problem happens because of dynamic imports in deps of current project, so only adding them as dev deps helps.
290+
291+
### Development run
284292

285293
For development and testing purposes, you can run the project directly without compilation:
286294

@@ -334,4 +342,4 @@ If you encounter any problems or have any questions, please open an issue on the
334342

335343
## Version
336344

337-
Current version: 0.2.1
345+
Current version: 0.2.3

build.ts

+12-6
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ const OUTPUT_FILE = path.join(DIST_DIR, "ai-console-agent");
1010
const TEMP_OUTPUT_FILE = path.join(PROJECT_ROOT, "temp-ai-console-agent");
1111

1212
async function build() {
13-
checkBunVersion();
14-
1513
console.log("Starting build process...");
1614
console.log("Build environment:");
1715
console.log(`Bun version: ${process.versions.bun}`);
1816
console.log(`Current working directory: ${process.cwd()}`);
17+
console.log(`PROJECT_ROOT: ${PROJECT_ROOT}`);
18+
console.log(`DIST_DIR: ${DIST_DIR}`);
19+
console.log(`MAIN_FILE: ${MAIN_FILE}`);
20+
console.log(`OUTPUT_FILE: ${OUTPUT_FILE}`);
21+
console.log(`TEMP_OUTPUT_FILE: ${TEMP_OUTPUT_FILE}`);
1922

20-
// Ensure dist directory exists or create it
23+
checkBunVersion();
2124
ensureDirectoryExists(DIST_DIR);
2225

2326
console.log("Installing dependencies...");
@@ -36,14 +39,17 @@ async function build() {
3639
"--compile",
3740
"--minify",
3841
"--sourcemap",
39-
"--outfile",
40-
TEMP_OUTPUT_FILE,
4142
"--target",
4243
"bun",
4344
"--format",
4445
"esm",
46+
"--outfile",
47+
TEMP_OUTPUT_FILE,
4548
],
46-
{ stdio: "inherit" },
49+
{
50+
stdio: "inherit",
51+
env: { ...process.env, NODE_ENV: "production" },
52+
},
4753
);
4854

4955
if (result.status !== 0) {

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ai-console-agent",
3-
"version": "0.2.1",
3+
"version": "0.2.3",
44
"engines": {
55
"bun": "1.1.30"
66
},
@@ -22,7 +22,7 @@
2222
"llamaindex": "^0.6.18",
2323
"@xenova/transformers": "^2.17.2",
2424
"pg": "^8.13.0",
25-
"pgvector": "^0.2.0",
25+
"pgvector": "^0.2.0"
2626
},
2727
"trustedDependencies": [
2828
"protobufjs"

0 commit comments

Comments
 (0)