refactor: move source files into workspace crates

- Move src/* into crates/tui/src/ to create a proper workspace structure
- Add .claude/ and .trimtab/ directories for Trimtab closed-loop workflow
- Add DEPENDENCY_GRAPH.md and update documentation
- Update Cargo.toml files to reflect new crate dependencies
- Update CI workflows and npm package scripts
- All tests pass, release build works
This commit is contained in:
Hunter Bown
2026-03-11 20:00:38 -05:00
parent cc0ac49822
commit 7b91169017
171 changed files with 4326 additions and 981 deletions
+45
View File
@@ -53,6 +53,51 @@ jobs:
- name: Build
run: cargo build --release
npm-wrapper-smoke:
name: npm wrapper smoke
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: Swatinem/rust-cache@v2
- name: Build wrapper binaries
run: cargo build --release --locked -p deepseek-tui-cli -p deepseek-tui
- name: Prepare local release assets
run: node scripts/release/prepare-local-release-assets.js "$RUNNER_TEMP/release-assets"
- name: Start local release server
run: |
python3 -m http.server 8123 --directory "$RUNNER_TEMP/release-assets" >/tmp/deepseek-release-server.log 2>&1 &
sleep 1
- name: Pack npm wrapper
working-directory: npm/deepseek-tui
env:
DEEPSEEK_TUI_FORCE_DOWNLOAD: "1"
DEEPSEEK_TUI_RELEASE_BASE_URL: http://127.0.0.1:8123/
run: npm pack
- name: Install packed wrapper
env:
DEEPSEEK_TUI_FORCE_DOWNLOAD: "1"
DEEPSEEK_TUI_RELEASE_BASE_URL: http://127.0.0.1:8123/
run: |
mkdir -p "$RUNNER_TEMP/npm-smoke"
cd "$RUNNER_TEMP/npm-smoke"
npm init -y
npm install "$GITHUB_WORKSPACE/npm/deepseek-tui"/deepseek-tui-*.tgz
- name: Smoke wrapper entrypoints
env:
DEEPSEEK_TUI_FORCE_DOWNLOAD: "1"
DEEPSEEK_TUI_RELEASE_BASE_URL: http://127.0.0.1:8123/
run: |
cd "$RUNNER_TEMP/npm-smoke"
npx --no-install deepseek --help
npx --no-install deepseek-tui --help
# Check documentation builds without warnings
docs:
name: Documentation
+7 -10
View File
@@ -7,7 +7,7 @@ on:
jobs:
publish:
name: Publish to crates.io
name: Publish workspace crates to crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -16,15 +16,12 @@ jobs:
- name: Verify version matches tag
if: github.event_name == 'release'
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v}
CARGO_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version')
if [ "$TAG_VERSION" != "$CARGO_VERSION" ]; then
echo "Tag version ($TAG_VERSION) does not match Cargo.toml version ($CARGO_VERSION)"
exit 1
fi
run: ./scripts/release/verify-workspace-version.sh "${GITHUB_REF#refs/tags/v}"
- name: Publish to crates.io
run: cargo publish
- name: Preflight workspace crate publishes in workspace order
run: ./scripts/release/publish-crates.sh dry-run
- name: Publish crates.io packages in workspace order
run: ./scripts/release/publish-crates.sh publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
+12
View File
@@ -99,6 +99,18 @@ jobs:
path: artifacts
- name: List artifacts
run: find artifacts -type f
- name: Generate checksum manifest
shell: bash
run: |
mkdir -p artifacts/checksums
manifest="artifacts/checksums/deepseek-artifacts-sha256.txt"
: > "${manifest}"
while IFS= read -r -d '' file; do
hash="$(sha256sum "${file}" | awk '{print $1}')"
base="$(basename "${file}")"
printf '%s %s\n' "${hash}" "${base}" >> "${manifest}"
done < <(find artifacts -type f ! -path 'artifacts/checksums/*' -print0 | sort -z)
cat "${manifest}"
- uses: softprops/action-gh-release@v1
with:
files: artifacts/*/*