@mestreyoda/fabrica 0.2.16 → 0.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/defaults/fabrica/prompts/developer.md +16 -9
- package/dist/index.js +2684 -53
- package/package.json +1 -3
- package/dist/lib/worker.cjs +0 -214
- package/dist/worker.cjs +0 -4754
package/README.md
CHANGED
|
@@ -120,6 +120,8 @@ The plugin should load immediately after install, without manual remediation.
|
|
|
120
120
|
openclaw plugins inspect fabrica
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
+
If OpenClaw warns that `plugins.allow` is empty and non-bundled plugins may auto-load, that is a host trust-policy warning, not a Fabrica install failure. Fabrica can be installed and loadable while the OpenClaw operator still has to decide whether to keep open discovery or set an explicit trusted plugin list in `plugins.allow`.
|
|
124
|
+
|
|
123
125
|
**4. Configure Fabrica for a workspace**:
|
|
124
126
|
|
|
125
127
|
```bash
|
|
@@ -24,20 +24,25 @@ Read the comments carefully — they often contain clarifications, decisions, or
|
|
|
24
24
|
|
|
25
25
|
### 1. Use the assigned worktree
|
|
26
26
|
|
|
27
|
-
**NEVER work in the main checkout.**
|
|
27
|
+
**NEVER work in the main checkout.** The task message includes a `Repo:` / `Execution path:` line with the canonical repository path for this project. Start there first. If that path is missing, inaccessible, or points somewhere unexpected, stop and return `Work result: BLOCKED` instead of creating the project under another workspace.
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
# Example:
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
# Example: task message says Repo: /home/ubuntu/git/acme/myproject
|
|
31
|
+
REPO_ROOT="/absolute/path/from-task-message"
|
|
32
|
+
cd "$REPO_ROOT"
|
|
33
33
|
BRANCH="feature/<issue-id>-<slug>"
|
|
34
34
|
WORKTREE="${REPO_ROOT}.worktrees/${BRANCH}"
|
|
35
|
-
git worktree
|
|
36
|
-
cd "$WORKTREE"
|
|
35
|
+
if git worktree list --porcelain | grep -Fq "worktree ${WORKTREE}"; then
|
|
36
|
+
cd "$WORKTREE"
|
|
37
|
+
else
|
|
38
|
+
git worktree add "$WORKTREE" -b "$BRANCH"
|
|
39
|
+
cd "$WORKTREE"
|
|
40
|
+
fi
|
|
37
41
|
```
|
|
38
42
|
|
|
39
43
|
The `.worktrees/` directory sits NEXT TO the repo folder (not inside it). This keeps the main checkout clean for the orchestrator and other workers. If the assigned worktree already exists from a previous task on the same branch, verify it's clean and reuse it.
|
|
40
|
-
|
|
44
|
+
|
|
45
|
+
Never create or implement the project under `~/.openclaw/workspace/<slug>` unless the task message explicitly says that directory is the canonical repo path. Once you are in the assigned worktree, stay there for the rest of the task and do not switch back to the main checkout.
|
|
41
46
|
|
|
42
47
|
### 2. Implement the changes
|
|
43
48
|
|
|
@@ -133,9 +138,11 @@ PR_NUM=$(gh pr list --head "$BRANCH" --json number -q '.[0].number')
|
|
|
133
138
|
QA_RAW=$(bash scripts/qa.sh 2>&1); QA_EXIT=$?
|
|
134
139
|
# MANDATORY: sanitize before embedding in PR — strip lines with tokens/keys/env vars/host paths
|
|
135
140
|
QA_OUTPUT=$(printf '%s' "$QA_RAW" | grep -v -iE '(TOKEN|SECRET|_KEY|PASSWORD|CREDENTIAL|PRIVATE|AUTH)=' | grep -v -E '(ghp_|gho_|github_pat_|sk-|xox[bprs]-|AIza|AKIA|glpat-)' | grep -v -E '^declare -x ' | grep -v -E '(/home/|~/.openclaw/)' | head -200)
|
|
136
|
-
|
|
141
|
+
REPO_SLUG=$(gh repo view --json nameWithOwner -q '.nameWithOwner')
|
|
142
|
+
CURRENT_BODY=$(gh api "repos/$REPO_SLUG/pulls/$PR_NUM" --jq '.body')
|
|
137
143
|
BODY_NO_QA=$(printf '%s' "$CURRENT_BODY" | perl -0pe 's/\n## QA Evidence\b[\s\S]*?(?=\n##\s|\z)//g')
|
|
138
|
-
|
|
144
|
+
NEW_BODY=$(printf '%s\n\n## QA Evidence\n\n```\n%s\n```\n\nExit code: %d\n' "$BODY_NO_QA" "$QA_OUTPUT" "$QA_EXIT")
|
|
145
|
+
gh api --method PATCH "repos/$REPO_SLUG/pulls/$PR_NUM" -f body="$NEW_BODY" >/dev/null
|
|
139
146
|
```
|
|
140
147
|
|
|
141
148
|
**NEVER bypass the sanitization step.** Never embed raw, unfiltered command output in PR descriptions.
|