mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-13 08:15:14 +02:00
Refine Conductor setup script structure
This commit is contained in:
parent
d6c43d19e7
commit
376d3a43b8
3 changed files with 48 additions and 21 deletions
|
|
@ -27,11 +27,12 @@ describe('Conductor workspace scripts', () => {
|
|||
assert.match(setupScript, /pnpm run native:rebuild/);
|
||||
assert.match(setupScript, /pnpm run build/);
|
||||
assert.match(setupScript, /packages\/cli\/dist\/bin\.js dev doctor setup --no-input/);
|
||||
assert.match(setupScript, /sh scripts\/setup-conductor-workspace\.sh/);
|
||||
assert.match(setupScript, /link_agent_overlays/);
|
||||
assert.match(setupScript, /sh scripts\/link-agent-overlays\.sh/);
|
||||
});
|
||||
|
||||
it('links private agent overlays when KAELIO_SKILLS_ROOT is set', async () => {
|
||||
const workspaceScript = await readText('scripts/setup-conductor-workspace.sh');
|
||||
const workspaceScript = await readText('scripts/link-agent-overlays.sh');
|
||||
|
||||
assert.match(workspaceScript, /KAELIO_SKILLS_ROOT/);
|
||||
assert.match(workspaceScript, /agents_source="\$\{KAELIO_SKILLS_ROOT\}\/\.agents"/);
|
||||
|
|
|
|||
|
|
@ -82,31 +82,57 @@ resolve_uv_for_project() {
|
|||
printf '%s\n' "$workspace_uv"
|
||||
}
|
||||
|
||||
echo "=== Conductor KTX workspace setup ==="
|
||||
link_agent_overlays() {
|
||||
sh scripts/link-agent-overlays.sh
|
||||
}
|
||||
|
||||
sh scripts/setup-conductor-workspace.sh
|
||||
link_root_env_file() {
|
||||
if [ -n "${CONDUCTOR_ROOT_PATH:-}" ] && [ -f "$CONDUCTOR_ROOT_PATH/.env" ]; then
|
||||
ln -sf "$CONDUCTOR_ROOT_PATH/.env" .env
|
||||
echo "Linked .env"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -n "${CONDUCTOR_ROOT_PATH:-}" ] && [ -f "$CONDUCTOR_ROOT_PATH/.env" ]; then
|
||||
ln -sf "$CONDUCTOR_ROOT_PATH/.env" .env
|
||||
echo "Linked .env"
|
||||
fi
|
||||
install_python_dependencies() {
|
||||
KTX_UV_BIN="$(resolve_uv_for_project "pyproject.toml")"
|
||||
export PATH="$(dirname "$KTX_UV_BIN"):$PATH"
|
||||
|
||||
KTX_UV_BIN="$(resolve_uv_for_project "pyproject.toml")"
|
||||
export PATH="$(dirname "$KTX_UV_BIN"):$PATH"
|
||||
echo "Installing KTX Python dependencies..."
|
||||
uv sync --all-packages --all-groups
|
||||
}
|
||||
|
||||
echo "Installing KTX Python dependencies..."
|
||||
uv sync --all-packages --all-groups
|
||||
install_js_dependencies() {
|
||||
echo "Installing KTX JS dependencies..."
|
||||
pnpm install --frozen-lockfile --prefer-offline
|
||||
}
|
||||
|
||||
echo "Installing KTX JS dependencies..."
|
||||
pnpm install --frozen-lockfile --prefer-offline
|
||||
rebuild_native_dependencies() {
|
||||
echo "Rebuilding native JS dependencies..."
|
||||
pnpm run native:rebuild
|
||||
}
|
||||
|
||||
echo "Rebuilding native JS dependencies..."
|
||||
pnpm run native:rebuild
|
||||
build_workspace() {
|
||||
echo "Building KTX packages..."
|
||||
pnpm run build
|
||||
}
|
||||
|
||||
echo "Building KTX packages..."
|
||||
pnpm run build
|
||||
run_setup_doctor() {
|
||||
echo "Running KTX setup doctor..."
|
||||
node packages/cli/dist/bin.js dev doctor setup --no-input
|
||||
}
|
||||
|
||||
echo "Running KTX setup doctor..."
|
||||
node packages/cli/dist/bin.js dev doctor setup --no-input
|
||||
main() {
|
||||
echo "=== Conductor KTX workspace setup ==="
|
||||
|
||||
echo "=== Setup complete ==="
|
||||
link_agent_overlays
|
||||
link_root_env_file
|
||||
install_python_dependencies
|
||||
install_js_dependencies
|
||||
rebuild_native_dependencies
|
||||
build_workspace
|
||||
run_setup_doctor
|
||||
|
||||
echo "=== Setup complete ==="
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue