refactor: rombak dari monorepo ke project tunggal — flat src/{domain,application,infrastructure,interfaces}, satu package.json tanpa workspaces, tsconfig paths → src/*, update install.sh/Dockerfile/CI

This commit is contained in:
asepharyana committed 2026-09-02 22:56:26 +07:00
1 parent e91fda3691
commit 0ee0cc4350
196 files changed
+31 -337

No files matched your search

+2 -2
View File
@@ -29,7 +29,7 @@ jobs:
run: bun test
- name: Build CLI bundle
run: bun build apps/interfaces/cli/src/index.ts --target=bun --outdir=/tmp/zesdex-build
run: bun run build
- name: Smoke — CLI help
run: bun /tmp/zesdex-build/index.js --help
run: ./dist/zesdex --help
+1
View File
@@ -11,3 +11,4 @@ docs/lesson/
dist/
apps/**/edit-log/
edit-log/
dist/
+3 -3
View File
@@ -5,14 +5,14 @@
FROM oven/bun:1.2 AS builder
WORKDIR /app
COPY bun.lockb bun.lock ./
COPY bun.lock ./
COPY package.json tsconfig.json ./
COPY apps ./apps
COPY src ./src
RUN bun install --frozen-lockfile
# Compile a standalone self-contained executable (bundles JS + native addons).
RUN bun build apps/interfaces/cli/src/index.ts --compile --outfile=/app/zesdex
RUN bun build src/interfaces/cli/index.ts --compile --outfile=/app/zesdex
# Stage 2: Minimal runtime image
FROM debian:bookworm-slim
-18
View File
@@ -1,18 +0,0 @@
{
"name": "@zesdex/api",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"api": "bun src/main.ts",
"build": "true"
},
"dependencies": {
"@zesdex/domain": "workspace:*",
"@zesdex/application": "workspace:*",
"@zesdex/infrastructure": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-24
View File
@@ -1,24 +0,0 @@
{
"name": "@zesdex/cli",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"cli": "bun src/index.ts",
"build": "true",
"bootstrap": "bun src/bootstrap.ts"
},
"dependencies": {
"@zesdex/domain": "workspace:*",
"@zesdex/application": "workspace:*",
"@zesdex/infrastructure": "workspace:*",
"@zesdex/api": "workspace:*",
"@zesdex/ws": "workspace:*",
"@zesdex/grpc": "workspace:*",
"@zesdex/web": "workspace:*",
"@zesdex/daemon": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-18
View File
@@ -1,18 +0,0 @@
{
"name": "@zesdex/daemon",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"daemon": "bun src/main.ts",
"build": "true"
},
"dependencies": {
"@zesdex/domain": "workspace:*",
"@zesdex/application": "workspace:*",
"@zesdex/infrastructure": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-13
View File
@@ -1,13 +0,0 @@
{
"name": "@zesdex/grpc",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"grpc": "bun src/main.ts",
"build": "true"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-16
View File
@@ -1,16 +0,0 @@
{
"name": "@zesdex/tui",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"tui": "bun src/main.ts",
"build": "true"
},
"dependencies": {
"@zesdex/domain": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-13
View File
@@ -1,13 +0,0 @@
{
"name": "@zesdex/web",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"web": "bun src/main.ts",
"build": "true"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-18
View File
@@ -1,18 +0,0 @@
{
"name": "@zesdex/ws",
"version": "1.21.2",
"private": true,
"type": "module",
"scripts": {
"ws": "bun src/main.ts",
"build": "true"
},
"dependencies": {
"@zesdex/domain": "workspace:*",
"@zesdex/application": "workspace:*",
"@zesdex/infrastructure": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}
-21
View File
@@ -1,21 +0,0 @@
{
"name": "@zesdex/application",
"version": "1.21.2",
"private": true,
"type": "module",
"description": "Zesdex application layer — port traits, use cases, turn service (depends only on @zesdex/domain)",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"test": "bun test",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@zesdex/domain": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0",
"typescript": "^5.7.0"
}
}
-18
View File
@@ -1,18 +0,0 @@
{
"name": "@zesdex/domain",
"version": "1.21.2",
"private": true,
"type": "module",
"description": "Zesdex domain layer — pure types, value objects, and port interfaces (zero I/O)",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"test": "bun test",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@types/bun": "^1.2.0",
"typescript": "^5.7.0"
}
}
-22
View File
@@ -1,22 +0,0 @@
{
"name": "@zesdex/infrastructure",
"version": "1.21.2",
"private": true,
"type": "module",
"description": "Zesdex infrastructure layer — concrete adapters (LLM, tools, persistence, auth, MCP, IPC, workflow)",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"test": "bun test",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@zesdex/domain": "workspace:*",
"@zesdex/application": "workspace:*"
},
"devDependencies": {
"@types/bun": "^1.2.0",
"typescript": "^5.7.0"
}
}
-128
View File
@@ -12,114 +12,6 @@
"typescript": "^5.7.0",
},
},
"apps/interfaces/api": {
"name": "@zesdex/api",
"version": "1.21.2",
"dependencies": {
"@zesdex/application": "workspace:*",
"@zesdex/domain": "workspace:*",
"@zesdex/infrastructure": "workspace:*",
},
"devDependencies": {
"@types/bun": "^1.2.0",
},
},
"apps/interfaces/cli": {
"name": "@zesdex/cli",
"version": "1.21.2",
"dependencies": {
"@zesdex/api": "workspace:*",
"@zesdex/application": "workspace:*",
"@zesdex/daemon": "workspace:*",
"@zesdex/domain": "workspace:*",
"@zesdex/grpc": "workspace:*",
"@zesdex/infrastructure": "workspace:*",
"@zesdex/web": "workspace:*",
"@zesdex/ws": "workspace:*",
},
"devDependencies": {
"@types/bun": "^1.2.0",
},
},
"apps/interfaces/daemon": {
"name": "@zesdex/daemon",
"version": "1.21.2",
"dependencies": {
"@zesdex/application": "workspace:*",
"@zesdex/domain": "workspace:*",
"@zesdex/infrastructure": "workspace:*",
},
"devDependencies": {
"@types/bun": "^1.2.0",
},
},
"apps/interfaces/grpc": {
"name": "@zesdex/grpc",
"version": "1.21.2",
"devDependencies": {
"@types/bun": "^1.2.0",
},
},
"apps/interfaces/tui": {
"name": "@zesdex/tui",
"version": "1.21.2",
"dependencies": {
"@zesdex/domain": "workspace:*",
},
"devDependencies": {
"@types/bun": "^1.2.0",
},
},
"apps/interfaces/web": {
"name": "@zesdex/web",
"version": "1.21.2",
"devDependencies": {
"@types/bun": "^1.2.0",
},
},
"apps/interfaces/ws": {
"name": "@zesdex/ws",
"version": "1.21.2",
"dependencies": {
"@zesdex/application": "workspace:*",
"@zesdex/domain": "workspace:*",
"@zesdex/infrastructure": "workspace:*",
},
"devDependencies": {
"@types/bun": "^1.2.0",
},
},
"apps/packages/application": {
"name": "@zesdex/application",
"version": "1.21.2",
"dependencies": {
"@zesdex/domain": "workspace:*",
},
"devDependencies": {
"@types/bun": "^1.2.0",
"typescript": "^5.7.0",
},
},
"apps/packages/domain": {
"name": "@zesdex/domain",
"version": "1.21.2",
"devDependencies": {
"@types/bun": "^1.2.0",
"typescript": "^5.7.0",
},
},
"apps/packages/infrastructure": {
"name": "@zesdex/infrastructure",
"version": "1.21.2",
"dependencies": {
"@zesdex/application": "workspace:*",
"@zesdex/domain": "workspace:*",
},
"devDependencies": {
"@types/bun": "^1.2.0",
"typescript": "^5.7.0",
},
},
},
"packages": {
"@node-rs/argon2": ["@node-rs/argon2@2.2.0", "", { "optionalDependencies": { "@node-rs/argon2-android-arm-eabi": "2.2.0", "@node-rs/argon2-android-arm64": "2.2.0", "@node-rs/argon2-darwin-arm64": "2.2.0", "@node-rs/argon2-darwin-x64": "2.2.0", "@node-rs/argon2-freebsd-x64": "2.2.0", "@node-rs/argon2-linux-arm-gnueabihf": "2.2.0", "@node-rs/argon2-linux-arm64-gnu": "2.2.0", "@node-rs/argon2-linux-arm64-musl": "2.2.0", "@node-rs/argon2-linux-x64-gnu": "2.2.0", "@node-rs/argon2-linux-x64-musl"Line truncated
@@ -154,26 +46,6 @@
"@types/node": ["@types/node@26.4.1", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA=="],
"@zesdex/api": ["@zesdex/api@workspace:apps/interfaces/api"],
"@zesdex/application": ["@zesdex/application@workspace:apps/packages/application"],
"@zesdex/cli": ["@zesdex/cli@workspace:apps/interfaces/cli"],
"@zesdex/daemon": ["@zesdex/daemon@workspace:apps/interfaces/daemon"],
"@zesdex/domain": ["@zesdex/domain@workspace:apps/packages/domain"],
"@zesdex/grpc": ["@zesdex/grpc@workspace:apps/interfaces/grpc"],
"@zesdex/infrastructure": ["@zesdex/infrastructure@workspace:apps/packages/infrastructure"],
"@zesdex/tui": ["@zesdex/tui@workspace:apps/interfaces/tui"],
"@zesdex/web": ["@zesdex/web@workspace:apps/interfaces/web"],
"@zesdex/ws": ["@zesdex/ws@workspace:apps/interfaces/ws"],
"bun-types": ["bun-types@1.4.0", "", { "dependencies": { "@types/node": "*" } }, "sha512-iIKw23BspnQQYd3prITOBxeUsxBHnwzX6YJfGMuNOZzeNcMmVqzIIVGRm1l69ogaPQmb4wB6BN8mA5bE9YuC5Q=="],
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
+1 -1
View File
@@ -16,7 +16,7 @@ echo "==> Installing dependencies..."
bun install --cwd "$REPO_DIR" --frozen-lockfile
echo "==> Compiling $BIN_NAME (self-contained executable)..."
bun build "$REPO_DIR/apps/interfaces/cli/src/index.ts" --compile --outfile "$TMP_BIN"
bun build "$REPO_DIR/src/interfaces/cli/index.ts" --compile --outfile "$TMP_BIN"
if [ ! -f "$TMP_BIN" ]; then
echo "ERROR: build succeeded but binary not found at $TMP_BIN" >&2
+13 -11
View File
@@ -1,22 +1,24 @@
{
"name": "zesdex",
"version": "1.21.2",
"version": "1.22.0",
"private": true,
"type": "module",
"packageManager": "bun@1.3.14",
"description": "Zesdex — AI-native autonomous coding agent (TypeScript/Bun rewrite of the Rust project)",
"description": "Zesdex — AI-native autonomous coding agent (TypeScript/Bun)",
"license": "MIT",
"workspaces": [
"apps/packages/*",
"apps/interfaces/*"
],
"scripts": {
"build": "bun run --cwd apps/interfaces/cli build",
"build": "bun build src/interfaces/cli/index.ts --compile --outfile=dist/zesdex",
"check": "tsc --noEmit",
"test": "bun test",
"format": "bun format",
"cli": "bun run --cwd apps/interfaces/cli cli",
"bootstrap": "bun run --cwd apps/interfaces/cli bootstrap"
"format": "bun fmt",
"cli": "bun src/interfaces/cli/index.ts",
"bootstrap": "bun src/interfaces/cli/bootstrap.ts",
"api": "bun src/interfaces/api/main.ts",
"ws": "bun src/interfaces/ws/main.ts",
"grpc": "bun src/interfaces/grpc/main.ts",
"web": "bun src/interfaces/web/main.ts",
"daemon": "bun src/interfaces/daemon/main.ts",
"tui": "bun src/interfaces/tui/main.ts"
},
"devDependencies": {
"@types/bun": "^1.2.0",
@@ -25,4 +27,4 @@
"dependencies": {
"@node-rs/argon2": "^2.2.0"
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 50 of 196 files, more files were not shown because too many files have changed in this diff. Show more