#!/bin/sh
set -eu

project=/workspace/zhct/zhctproject/ai_api
harness=/workspace/zhct/zhctprompt/work/2026-09-28-smart-canteen-dm8-poc/http-harness
target=$(mktemp -d /tmp/zhct-http-ai-mysql.XXXXXX)
tar -C "$project" -cf - config public | tar -C "$target" -xf -
ln -s "$project/app" "$target/app"
ln -s "$project/cores" "$target/cores"
ln -s "$project/vendor" "$target/vendor"
ln -s "$project/route" "$target/route"
ln -s "$project/think" "$target/think"
cp "$harness/ai-api/public/index.php" "$target/public/index.php"
cp "$harness/ai-api/config/database.php" "$target/config/database.php"
printf '%s\n' "$target"
