Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches: [dev, main]
pull_request:
branches: [dev, main]

permissions:
contents: read

env:
GOFLAGS: -buildvcs=false
GOWORK: "off"
GOPROXY: "direct"
GOSUMDB: "off"

jobs:
test:
name: Test + Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Test with coverage
working-directory: go
run: go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: go/coverage.out
flags: unittests
fail_ci_if_error: false

lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- uses: golangci/golangci-lint-action@v9
with:
version: latest
working-directory: go
args: --timeout=5m --tests=false

sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Test for coverage
working-directory: go
run: go test -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=dappcore
-Dsonar.projectKey=dappcore_ide
-Dsonar.sources=go
-Dsonar.exclusions=**/vendor/**,**/third_party/**,**/.tmp/**,**/*_test.go
-Dsonar.tests=go
-Dsonar.test.inclusions=**/*_test.go
-Dsonar.go.coverage.reportPaths=go/coverage.out
48 changes: 48 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[submodule "external/go"]
path = external/go
url = https://github.com/dappcore/go.git
branch = dev
[submodule "external/config"]
path = external/config
url = https://github.com/dappcore/config.git
branch = dev
[submodule "external/gui"]
path = external/gui
url = https://github.com/dappcore/gui.git
branch = dev
[submodule "external/io"]
path = external/io
url = https://github.com/dappcore/go-io.git
branch = dev
[submodule "external/mcp"]
path = external/mcp
url = https://github.com/dappcore/mcp.git
branch = dev
[submodule "external/process"]
path = external/process
url = https://github.com/dappcore/go-process.git
branch = dev
[submodule "external/scm"]
path = external/scm
url = https://github.com/dappcore/go-scm.git
branch = dev
[submodule "external/store"]
path = external/store
url = https://github.com/dappcore/go-store.git
branch = dev
[submodule "external/ws"]
path = external/ws
url = https://github.com/dappcore/go-ws.git
branch = dev
[submodule "external/rag"]
path = external/rag
url = https://github.com/dappcore/go-rag.git
branch = dev
[submodule "external/webview"]
path = external/webview
url = https://github.com/dappcore/go-webview.git
branch = dev
[submodule "external/log"]
path = external/log
url = https://github.com/dappcore/go-log.git
branch = dev
4 changes: 2 additions & 2 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
GOFLAGS: -buildvcs=false
GOWORK: "off"
commands:
- golangci-lint run --timeout=5m ./...
- cd go && golangci-lint run --timeout=5m ./...

- name: go-test
image: golang:1.26-alpine
Expand All @@ -25,7 +25,7 @@ steps:
CGO_ENABLED: "1"
commands:
- apk add --no-cache git build-base
- go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- cd go && go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: sonar
image: sonarsource/sonar-scanner-cli:latest
depends_on: [go-test]
Expand Down
18 changes: 10 additions & 8 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,16 @@ brain:
| `CORE_API_TOKEN` | (empty) | Bearer token for Laravel backend auth |
| `MCP_ADDR` | (empty) | TCP address for MCP server (headless mode) |

## Workspace Dependencies

This module uses a Go workspace (`~/Code/go.work`) with `replace` directives for sibling modules:
- `../go` → `forge.lthn.ai/core/go`
- `../gui` → `forge.lthn.ai/core/gui`
- `../mcp` → `forge.lthn.ai/core/mcp`
- `../config` → `forge.lthn.ai/core/config`
- `../go-ws` → `forge.lthn.ai/core/go-ws`
## Go Module Layout (new)

Go sources now live under `go/` and keep the module path unchanged:
`dappco.re/go/ide`. From repo root:
- `go/` is the module root (contains `go.mod`, `go.sum`, `cmd/`, `pkg/`, `tests/`, `third_party/`)
- `frontend/`, `icons/`, `build/`, `dist/`, `bin/`, and `workspace/` remain at root
- `go/README.md`, `go/CLAUDE.md`, `go/AGENTS.md`, and `go/docs` are symlinks back to root `README.md`, `CLAUDE.md`, `AGENTS.md`, `docs`

Go commands should be run from the module directory:
- `cd go && core go test` (or `go test ./...` via module tools)

## Conventions

Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

# core/ide

> Lethean IDE — Wails frontend + Go binary; mounts agent + scm + workspace

[![CI](https://github.com/dappcore/ide/actions/workflows/ci.yml/badge.svg?branch=dev)](https://github.com/dappcore/ide/actions/workflows/ci.yml)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=dappcore_ide&metric=alert_status)](https://sonarcloud.io/dashboard?id=dappcore_ide)
[![Coverage](https://codecov.io/gh/dappcore/ide/branch/dev/graph/badge.svg)](https://codecov.io/gh/dappcore/ide)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=dappcore_ide&metric=security_rating)](https://sonarcloud.io/dashboard?id=dappcore_ide)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=dappcore_ide&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=dappcore_ide)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=dappcore_ide&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=dappcore_ide)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=dappcore_ide&metric=code_smells)](https://sonarcloud.io/dashboard?id=dappcore_ide)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=dappcore_ide&metric=ncloc)](https://sonarcloud.io/dashboard?id=dappcore_ide)
[![Go Reference](https://pkg.go.dev/badge/dappco.re/go/ide.svg)](https://pkg.go.dev/dappco.re/go/ide)
[![License: EUPL-1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](https://eupl.eu/1.2/en/)


## What Does `core-ide` Actually Do

`core-ide` exposes the Core IDE runtime as MCP tools, named Core actions, and a local chat shell.
Expand Down
6 changes: 3 additions & 3 deletions build/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tasks:
summary: Runs `go mod tidy`
internal: true
cmds:
- go mod tidy
- cd go && go mod tidy

install:frontend:deps:
summary: Install frontend dependencies
Expand Down Expand Up @@ -53,8 +53,8 @@ tasks:
- exclude: frontend/**/*
- frontend/bindings/**/*
- "**/*.go"
- go.mod
- go.sum
- go/go.mod
- go/go.sum
generates:
- frontend/bindings/**/*
cmds:
Expand Down
4 changes: 2 additions & 2 deletions build/darwin/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tasks:
ref: .DEV
- task: common:generate:icons
cmds:
- go build {{.BUILD_FLAGS}} -o {{.OUTPUT}}
- cd go && go build {{.BUILD_FLAGS}} -o {{.OUTPUT}}
vars:
BUILD_FLAGS: '{{if eq .DEV "true"}}{{if .EXTRA_TAGS}}-tags {{.EXTRA_TAGS}} {{end}}-buildvcs=false -gcflags=all="-l"{{else}}-tags production{{if .EXTRA_TAGS}},{{.EXTRA_TAGS}}{{end}} -trimpath -buildvcs=false -ldflags="-w -s"{{end}}'
DEFAULT_OUTPUT: '{{.BIN_DIR}}/{{.APP_NAME}}'
Expand Down Expand Up @@ -81,7 +81,7 @@ tasks:
# Handles both relative (=> ../) and absolute (=> /) paths
REPLACE_MOUNTS:
sh: |
grep -E '^replace .* => ' go.mod 2>/dev/null | while read -r line; do
cd go && grep -E '^replace .* => ' go.mod 2>/dev/null | while read -r line; do
path=$(echo "$line" | sed -E 's/^replace .* => //' | tr -d '\r')
# Convert relative paths to absolute
if [ "${path#/}" = "$path" ]; then
Expand Down
4 changes: 2 additions & 2 deletions build/linux/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tasks:
- task: common:generate:icons
- task: generate:dotdesktop
cmds:
- go build {{.BUILD_FLAGS}} -o {{.OUTPUT}}
- cd go && go build {{.BUILD_FLAGS}} -o {{.OUTPUT}}
vars:
BUILD_FLAGS: '{{if eq .DEV "true"}}{{if .EXTRA_TAGS}}-tags {{.EXTRA_TAGS}} {{end}}-buildvcs=false -gcflags=all="-l"{{else}}-tags production{{if .EXTRA_TAGS}},{{.EXTRA_TAGS}}{{end}} -trimpath -buildvcs=false -ldflags="-w -s"{{end}}'
DEFAULT_OUTPUT: '{{.BIN_DIR}}/{{.APP_NAME}}'
Expand Down Expand Up @@ -89,7 +89,7 @@ tasks:
# Extract replace directives from go.mod and create -v mounts for each
REPLACE_MOUNTS:
sh: |
grep -E '^replace .* => ' go.mod 2>/dev/null | while read -r line; do
cd go && grep -E '^replace .* => ' go.mod 2>/dev/null | while read -r line; do
path=$(echo "$line" | sed -E 's/^replace .* => //' | tr -d '\r')
# Convert relative paths to absolute
if [ "${path#/}" = "$path" ]; then
Expand Down
4 changes: 2 additions & 2 deletions build/windows/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tasks:
- task: common:generate:icons
cmds:
- task: generate:syso
- go build {{.BUILD_FLAGS}} -o "{{.BIN_DIR}}/{{.APP_NAME}}.exe"
- cd go && go build {{.BUILD_FLAGS}} -o "{{.BIN_DIR}}/{{.APP_NAME}}.exe"
- cmd: powershell Remove-item *.syso
platforms: [windows]
- cmd: rm -f *.syso
Expand Down Expand Up @@ -80,7 +80,7 @@ tasks:
# Extract replace directives from go.mod and create -v mounts for each
REPLACE_MOUNTS:
sh: |
grep -E '^replace .* => ' go.mod 2>/dev/null | while read -r line; do
cd go && grep -E '^replace .* => ' go.mod 2>/dev/null | while read -r line; do
path=$(echo "$line" | sed -E 's/^replace .* => //' | tr -d '\r')
# Convert relative paths to absolute
if [ "${path#/}" = "$path" ]; then
Expand Down
1 change: 1 addition & 0 deletions external/config
Submodule config added at aba665
1 change: 1 addition & 0 deletions external/go
Submodule go added at d661b7
1 change: 1 addition & 0 deletions external/gui
Submodule gui added at 4661ca
1 change: 1 addition & 0 deletions external/io
Submodule io added at 789653
1 change: 1 addition & 0 deletions external/log
Submodule log added at df0529
1 change: 1 addition & 0 deletions external/mcp
Submodule mcp added at 702c1b
1 change: 1 addition & 0 deletions external/process
Submodule process added at a0ad5c
1 change: 1 addition & 0 deletions external/rag
Submodule rag added at 825330
1 change: 1 addition & 0 deletions external/scm
Submodule scm added at 8be76f
1 change: 1 addition & 0 deletions external/store
Submodule store added at 3d32fd
1 change: 1 addition & 0 deletions external/webview
Submodule webview added at 4494ad
1 change: 1 addition & 0 deletions external/ws
Submodule ws added at c83f7a
20 changes: 20 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
go 1.26.2

// Workspace mode for development: pulls fresh code from external/ submodules.
// CI uses GOWORK=off to fall back to go/go.mod tags (reproducible).

use (
./go
./external/go
./external/config
./external/gui
./external/io
./external/mcp
./external/process
./external/scm
./external/store
./external/ws
./external/rag
./external/webview
./external/log
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Security Scan

on:
push:
branches: [main, dev, 'feat/*']
pull_request:
branches: [main]

jobs:
security:
uses: core/go-devops/.forgejo/workflows/security-scan.yml@main
secrets: inherit
14 changes: 14 additions & 0 deletions go/.lintdeps/dappco.re/go/gui@v0.9.0/.forgejo/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Test

on:
push:
branches: [main, dev]
pull_request:
branches: [main]

jobs:
test:
uses: core/go-devops/.forgejo/workflows/go-test.yml@main
with:
race: true
coverage: true
44 changes: 44 additions & 0 deletions go/.lintdeps/dappco.re/go/gui@v0.9.0/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Dependencies
node_modules/
vendor/

# Build output
dist/
build/

# IDE
.idea/
.vscode/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Logs
*.log

# Environment
.env
.env.local
.core/
.Spotlight-V100
.Trashes
*~
*.tmp
.env.*.local
__pycache__/
*.pyc
.venv/
venv/
*.exe
*.dll
*.so
*.dylib
*.a
*.o
*.class
*.test
coverage.out
*.coverprofile
3 changes: 3 additions & 0 deletions go/.lintdeps/dappco.re/go/gui@v0.9.0/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "internal/wails3"]
path = internal/wails3
url = https://github.com/wailsapp/wails.git
Loading
Loading