mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 14:16:28 +03:00
* Add DeepSeek Harness as a supported skills provider npx impeccable install now detects ~/.dsh (or $DSH_HOME when it sits under home) and installs into ~/.dsh/skills, the user-level skill root DeepSeek Harness scans, with project-level .dsh/skills on the same layout as other providers. Aliases: dsh, deepseek, deepseek-harness. Engine: PROVIDER_DIRS / aliases / display / input order / global hint, $DSH_HOME-aware user skills dir, provider id resolution from the skill dir, pin harness dirs, bundle path normalization for hashing. Build: dsh transformer target emitting the frontmatter DeepSeek Harness reads (user-invocable, license, compatibility, metadata; unknown keys are ignored there) with no emitHooks (DSH hooks are in-process plugins, not on-disk manifests) and no agentFormat (no documented on-disk subagent format); placeholders (AGENTS.md config file, ask_user_question tool, / command prefix), provider block tags, universal README entry. Docs: HARNESSES.md row and frontmatter column, CLI-CONTRACT constants, README/DEVELOP/AGENTS provider lists. Validation: cargo test --workspace; node scripts/run-tests.mjs core (138 pass); bun run build (19 providers, dist/dsh artifact verified); engine smoke against a fake HOME with a local bundle: install --providers=dsh --scope=global, auto-detected install, and update all resolve the .dsh provider. Generated provider output intentionally omitted per repo policy; the sync workflow regenerates tracked .dsh/skills after merge. Prepared with AI assistance (DeepSeek Harness coding agent). * Address review: DSH_HOME-only detection, generated-output pathspecs - Detect DeepSeek Harness through the resolved $DSH_HOME (fallback ~/.dsh) instead of gating on a fixed ~/.dsh path, so a DSH_HOME-only setup is offered by a provider-less install; generalize the two env-relocated config-dir hints (OpenCode, DSH) into one shared probe. - Add .dsh to the sync workflow's GENERATED_PATHS and CI's generated drift check so the tracked .dsh/skills payload is committed and validated. - Cover both behaviors: new install_detection_tests (DSH_HOME-only, default ~/.dsh, refused outside-home override) and a CLI-CONTRACT note on the resolved detection path. Validation: cargo test --workspace; node scripts/run-tests.mjs core (138 pass); engine smoke: DSH_HOME-only fake HOME installs globally into the resolved skills dir. Prepared with AI assistance (DeepSeek Harness coding agent). * Fix DeepSeek Harness home paths on Windows Use native relative-path containment, cover case and drive boundaries, and verify relocated global install/update without changing project skills. Add DSH output coverage and correct the install documentation. AI assistance: Codex, under pbakaus maintainer direction. * Document the CLI limit on external DSH homes Clarify that outside-home manual copies are not detected or updated by the CLI. AI assistance: Codex, under pbakaus maintainer direction. --------- Co-authored-by: Paul Bakaus <paul.bakaus@gmail.com>
143 lines
4.4 KiB
YAML
143 lines
4.4 KiB
YAML
name: Sync Generated Provider Output
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- ".claude-plugin/**"
|
|
- "cli/engine/**"
|
|
- "skill/**"
|
|
- "scripts/**"
|
|
- "package.json"
|
|
- "bun.lock"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: sync-generated-output
|
|
cancel-in-progress: false
|
|
|
|
env:
|
|
GENERATED_PATHS: >-
|
|
.agent
|
|
.agents
|
|
.codex
|
|
.claude
|
|
.cursor
|
|
.dsh
|
|
.gemini
|
|
.github/agents
|
|
.github/hooks
|
|
.github/skills
|
|
.grok
|
|
.hermes
|
|
.kiro
|
|
.opencode
|
|
.pi
|
|
.qoder
|
|
.rovodev
|
|
.trae
|
|
.trae-cn
|
|
.veto
|
|
.vibe
|
|
plugin
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
# Optional PAT or GitHub App token. With the default GITHUB_TOKEN,
|
|
# GitHub suppresses follow-up workflow runs from the generated commit.
|
|
token: ${{ secrets.SYNC_GENERATED_OUTPUT_TOKEN || github.token }}
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Build release output
|
|
run: bun run build:release
|
|
|
|
- name: Check generated output drift
|
|
id: drift
|
|
run: |
|
|
changes="$(git status --porcelain -- $GENERATED_PATHS)"
|
|
if [ -z "$changes" ]; then
|
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
echo "No generated provider output drift."
|
|
else
|
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
printf '%s\n' "$changes"
|
|
fi
|
|
|
|
- name: Commit generated output
|
|
id: commit
|
|
if: steps.drift.outputs.changed == 'true'
|
|
run: |
|
|
set -euo pipefail
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
# A push can lose the race against a human commit landing on main
|
|
# during the ~30s build window (issue #388: ~10% of runs). Instead
|
|
# of aborting and waiting for an unrelated push to re-trigger the
|
|
# sync, re-sync to the latest main, rebuild against the current
|
|
# source, and push again, with backoff. Every attempt builds from
|
|
# a fresh origin/main, so pushed output always matches the source
|
|
# state it lands on.
|
|
for attempt in 1 2 3 4 5; do
|
|
git add $GENERATED_PATHS
|
|
if git diff --cached --quiet; then
|
|
# The race that beat us was another sync (or the rebuilt output
|
|
# matches the new main); nothing left to push.
|
|
echo "No generated output drift after rebuild (attempt $attempt); nothing to push."
|
|
echo "pushed=false" >> "$GITHUB_OUTPUT"
|
|
exit 0
|
|
fi
|
|
git commit -m "Sync generated provider output"
|
|
|
|
git fetch origin main
|
|
if git merge-base --is-ancestor origin/main HEAD && git push origin HEAD:main; then
|
|
echo "Pushed generated output on attempt $attempt."
|
|
echo "pushed=true" >> "$GITHUB_OUTPUT"
|
|
exit 0
|
|
fi
|
|
|
|
# The recovery work is pointless on the final attempt: nothing
|
|
# would consume the rebuild, and the backoff would only delay
|
|
# the failure.
|
|
if [ "$attempt" = 5 ]; then break; fi
|
|
|
|
echo "Push did not land on attempt $attempt (main advanced, or the push itself failed); re-syncing and rebuilding."
|
|
git reset --hard origin/main
|
|
bun install --frozen-lockfile
|
|
bun run build:release
|
|
sleep $((attempt * 5))
|
|
done
|
|
|
|
echo "::error::Could not push generated output after 5 attempts (main kept advancing, or pushes kept failing); rerun this workflow on the latest main."
|
|
exit 1
|
|
|
|
- name: Summarize generated output commit
|
|
if: steps.drift.outputs.changed == 'true'
|
|
run: |
|
|
if [ "${{ steps.commit.outputs.pushed }}" = "true" ]; then
|
|
echo "Committed generated provider output directly to main." >> "$GITHUB_STEP_SUMMARY"
|
|
else
|
|
echo "Generated output drift resolved itself after a mid-run rebuild; nothing was pushed." >> "$GITHUB_STEP_SUMMARY"
|
|
fi
|