Remove Paperclip Docker references — runs locally via pm2
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 3m38s

- Deleted from Coolify (was exited:unhealthy since Apr 7)
- Updated CLAUDE.md service table: Paperclip is now pm2/local
- Removed Docker skills path fallback in app.py (always use local)
- Removed old paperclip-bug-report.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-14 13:13:26 +00:00
parent a093944967
commit 23f6b5d825
3 changed files with 5 additions and 70 deletions

View File

@@ -58,7 +58,8 @@
| Redis | תור משימות | `legal-ai-redis` |
| n8n | אוטומציית workflows | להגדרה |
| Gitea | מאגר קוד | `gitea.nautilus.marcusgroup.org/ezer-mishpati` |
| ezer-mishpati-web | ממשק העלאת מסמכים | `legal-ai.nautilus.marcusgroup.org` |
| ezer-mishpati-web | ממשק העלאת מסמכים (Docker/Coolify) | `legal-ai.nautilus.marcusgroup.org` |
| Paperclip | סוכן AI — מריץ Claude Code agents (pm2, מקומי) | `localhost:3100` |
| Infisical | ניהול סודות | `secret.dev.marcus-law.co.il` |
---

View File

@@ -1,65 +0,0 @@
# Bug: Skill import from Gitea — wrong raw URL format causes empty SKILL.md
**File at:** https://github.com/paperclipai/paperclip/issues/new
## Title
Skill import from Gitea: wrong raw URL format causes empty SKILL.md
## Body
### Bug Summary
When importing skills from a **Gitea** instance (self-hosted), Paperclip fetches the git tree successfully via the `/api/v3/` endpoint (which Gitea supports), but then uses the **wrong raw file URL format** to download `SKILL.md` content, resulting in a 404 and an almost-empty stub being saved.
### Environment
- Paperclip server: `@paperclipai/server@2026.403.0`
- Gitea instance: self-hosted Gitea
### Steps to Reproduce
1. Host a skill repo on a Gitea instance with a `SKILL.md` (32KB+), `scripts/`, and `references/` directories
2. Import the skill via URL: `https://my-gitea.example.com/org/skill-name.git`
3. Observe that only a stub SKILL.md (~283 bytes) is saved, and subdirectories are missing
### Root Cause
In `server/dist/services/github-fetch.js`, the `resolveRawGitHubUrl()` function builds:
```
https://{hostname}/raw/{owner}/{repo}/{ref}/{file}
```
This format works for **GitHub Enterprise**, but **not for Gitea**. Gitea expects:
```
https://{hostname}/{owner}/{repo}/raw/branch/{ref}/{file}
```
### Proof
```bash
# Paperclip's URL format -> 404
$ curl -s -o /dev/null -w "%{http_code}" "https://my-gitea.example.com/raw/org/skill-repo/main/SKILL.md"
404
# Correct Gitea format -> 200
$ curl -s -o /dev/null -w "%{http_code}" "https://my-gitea.example.com/org/skill-repo/raw/branch/main/SKILL.md"
200
```
### Secondary Issue
When `SKILL.md` is at the repository root, `path.posix.dirname("SKILL.md")` returns `"."`, causing the inventory filter `entry.startsWith("./")` to miss all sibling directories (`scripts/`, `references/`). This means even if the raw URL worked, subdirectories would still be excluded from the file inventory.
### Suggested Fix
1. **Detect Gitea** vs GitHub Enterprise (e.g., check for `/api/v1/` endpoint which is Gitea-specific, vs `/api/v3/`)
2. **Use the correct raw URL format** per platform:
- GitHub/GHE: `https://{hostname}/raw/{owner}/{repo}/{ref}/{file}`
- Gitea: `https://{hostname}/{owner}/{repo}/raw/branch/{ref}/{file}`
3. **Fix root-level SKILL.md inventory**: when `skillDir === "."`, include all files instead of filtering by `entry.startsWith("./")`
### Workaround
Manually clone the repo into `~/.paperclip/instances/default/skills/{company_id}/{slug}/` and update the `company_skills` table directly with correct markdown content and file_inventory.

View File

@@ -2172,10 +2172,9 @@ async def api_delete_tag_mapping(mapping_id: str):
PAPERCLIP_DB_URL = os.environ.get(
"PAPERCLIP_DB_URL", "postgresql://paperclip:paperclip@127.0.0.1:54329/paperclip"
)
# In Docker: mounted at /paperclip-skills; locally: ~/.paperclip/instances/default/skills
_docker_skills = Path("/paperclip-skills")
# Paperclip runs locally via pm2; skills are in ~/.paperclip
_local_skills = Path.home() / ".paperclip" / "instances" / "default" / "skills"
PAPERCLIP_SKILLS_DIR = _docker_skills if _docker_skills.exists() else _local_skills
PAPERCLIP_SKILLS_DIR = _local_skills
# Default company ID for skills
SKILLS_COMPANY_ID = os.environ.get("PAPERCLIP_COMPANY_ID", "42a7acd0-30c5-4cbd-ac97-7424f65df294")
@@ -2499,7 +2498,7 @@ async def api_restart_paperclip():
"message": "Restart requested — the host watcher will restart Paperclip shortly.",
}
except Exception:
raise HTTPException(500, "Cannot restart Paperclip from Docker. Run manually: pm2 restart paperclip")
raise HTTPException(500, "שגיאה בהפעלת restart. הרץ ידנית: pm2 restart paperclip")
@app.post("/api/cases/{case_number}/documents/upload-tagged")