@mindfoldhq/trellis 0.5.9 → 0.5.11
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/dist/migrations/manifests/0.5.10.json +9 -0
- package/dist/migrations/manifests/0.5.11.json +16 -0
- package/dist/migrations/manifests/0.6.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.5.json +9 -0
- package/dist/templates/common/commands/start.md +2 -0
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +39 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +289 -43
- package/dist/templates/pi/extensions/trellis/index.ts.txt +179 -4
- package/dist/templates/pi/settings.json +9 -0
- package/dist/templates/trellis/config.yaml +18 -0
- package/dist/templates/trellis/index.d.ts +1 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +2 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add_session.py +50 -24
- package/dist/templates/trellis/scripts/common/config.py +57 -1
- package/dist/templates/trellis/scripts/common/safe_commit.py +255 -0
- package/dist/templates/trellis/scripts/common/session_context.py +170 -0
- package/dist/templates/trellis/scripts/common/task_store.py +41 -5
- package/dist/utils/uninstall-scrubbers.d.ts +1 -0
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +21 -0
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Safe git-add helpers for Trellis-owned paths.
|
|
3
|
+
|
|
4
|
+
Why this module exists
|
|
5
|
+
----------------------
|
|
6
|
+
A real user incident: a project's `.gitignore` listed `.trellis/` (company-wide
|
|
7
|
+
template / personal habit). When `add_session.py` and `task.py archive` ran
|
|
8
|
+
their auto-commit and `git add` failed with `ignored by .gitignore`, the AI
|
|
9
|
+
agent driving the workflow "fixed" it by retrying with
|
|
10
|
+
`git add -f .trellis/` — which fan-out-included every ignored subtree
|
|
11
|
+
(`.trellis/.backup-*/`, `.trellis/worktrees/`, `.trellis/.template-hashes.json`,
|
|
12
|
+
`.trellis/.runtime/`), committing 548 files / 83474 lines of caches/backups.
|
|
13
|
+
|
|
14
|
+
Design
|
|
15
|
+
------
|
|
16
|
+
- Scripts only stage SPECIFIC product paths (journal files, index.md, the
|
|
17
|
+
current task dir, the archive dir). Never the whole `.trellis/` tree.
|
|
18
|
+
- If plain `git add <specific>` fails with "ignored by", DO NOT retry with
|
|
19
|
+
``-f``. The presence of `.trellis/` in `.gitignore` is treated as user
|
|
20
|
+
intent ("keep .trellis/ local-only"). The script warns and skips the
|
|
21
|
+
auto-commit; users who want auto-staging can either fix their `.gitignore`
|
|
22
|
+
or set ``session_auto_commit: false`` and manage git themselves.
|
|
23
|
+
- The warning includes a negative example: ``Do NOT use `git add -f .trellis/` ...``
|
|
24
|
+
so any AI rereading the log doesn't reinvent the bug.
|
|
25
|
+
|
|
26
|
+
History note: 0.5.10 introduced an automatic ``git add -f`` retry on the
|
|
27
|
+
specific paths. That was reverted in 0.5.11 — auto-forcing into a tree the
|
|
28
|
+
user had gitignored violates user intent even when the path list is narrow.
|
|
29
|
+
The wider-grain forbidden command stays forbidden, and the narrow-grain auto
|
|
30
|
+
``-f`` is gone too.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
from __future__ import annotations
|
|
34
|
+
|
|
35
|
+
import sys
|
|
36
|
+
from pathlib import Path
|
|
37
|
+
|
|
38
|
+
from .git import run_git
|
|
39
|
+
from .paths import (
|
|
40
|
+
DIR_ARCHIVE,
|
|
41
|
+
DIR_TASKS,
|
|
42
|
+
DIR_WORKFLOW,
|
|
43
|
+
DIR_WORKSPACE,
|
|
44
|
+
FILE_JOURNAL_PREFIX,
|
|
45
|
+
get_developer,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Paths under .trellis/ that must NEVER be auto-staged. Listed here so the
|
|
50
|
+
# warning to the user can show concrete subpaths to ignore individually
|
|
51
|
+
# instead of ignoring the whole `.trellis/` tree.
|
|
52
|
+
TRELLIS_IGNORED_SUBPATHS = (
|
|
53
|
+
".trellis/.backup-*",
|
|
54
|
+
".trellis/worktrees/",
|
|
55
|
+
".trellis/.template-hashes.json",
|
|
56
|
+
".trellis/.runtime/",
|
|
57
|
+
".trellis/.cache/",
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def safe_trellis_paths_to_add(repo_root: Path) -> list[str]:
|
|
62
|
+
"""Return the list of repo-relative paths the auto-commit should stage.
|
|
63
|
+
|
|
64
|
+
Only includes paths that exist on disk so callers don't pass non-existent
|
|
65
|
+
arguments to git. The caller is responsible for `git diff --cached`
|
|
66
|
+
checking afterwards.
|
|
67
|
+
|
|
68
|
+
Included:
|
|
69
|
+
- .trellis/workspace/<developer>/journal-*.md
|
|
70
|
+
- .trellis/workspace/<developer>/index.md
|
|
71
|
+
- .trellis/tasks/<task-dir>/ (every active task directory)
|
|
72
|
+
- .trellis/tasks/archive/ (whole archive subtree, if present)
|
|
73
|
+
|
|
74
|
+
Excluded (intentionally — these must not be staged):
|
|
75
|
+
- .trellis/.backup-*, .trellis/worktrees/,
|
|
76
|
+
.trellis/.template-hashes.json, .trellis/.runtime/, .trellis/.cache/
|
|
77
|
+
"""
|
|
78
|
+
paths: list[str] = []
|
|
79
|
+
|
|
80
|
+
# Workspace journal files + index.md
|
|
81
|
+
developer = get_developer(repo_root)
|
|
82
|
+
if developer:
|
|
83
|
+
ws = repo_root / DIR_WORKFLOW / DIR_WORKSPACE / developer
|
|
84
|
+
if ws.is_dir():
|
|
85
|
+
for f in sorted(ws.glob(f"{FILE_JOURNAL_PREFIX}*.md")):
|
|
86
|
+
if f.is_file():
|
|
87
|
+
paths.append(
|
|
88
|
+
f"{DIR_WORKFLOW}/{DIR_WORKSPACE}/{developer}/{f.name}"
|
|
89
|
+
)
|
|
90
|
+
index_md = ws / "index.md"
|
|
91
|
+
if index_md.is_file():
|
|
92
|
+
paths.append(
|
|
93
|
+
f"{DIR_WORKFLOW}/{DIR_WORKSPACE}/{developer}/index.md"
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
# Active tasks: each direct child of tasks/ that is a directory and not
|
|
97
|
+
# the archive root. The archive subtree is added as a single path below.
|
|
98
|
+
tasks_dir = repo_root / DIR_WORKFLOW / DIR_TASKS
|
|
99
|
+
if tasks_dir.is_dir():
|
|
100
|
+
for child in sorted(tasks_dir.iterdir()):
|
|
101
|
+
if not child.is_dir():
|
|
102
|
+
continue
|
|
103
|
+
if child.name == DIR_ARCHIVE:
|
|
104
|
+
continue
|
|
105
|
+
paths.append(f"{DIR_WORKFLOW}/{DIR_TASKS}/{child.name}")
|
|
106
|
+
|
|
107
|
+
archive_dir = tasks_dir / DIR_ARCHIVE
|
|
108
|
+
if archive_dir.is_dir():
|
|
109
|
+
paths.append(f"{DIR_WORKFLOW}/{DIR_TASKS}/{DIR_ARCHIVE}")
|
|
110
|
+
|
|
111
|
+
return paths
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def safe_archive_paths_to_add(repo_root: Path) -> list[str]:
|
|
115
|
+
"""Return paths to stage after `task.py archive`.
|
|
116
|
+
|
|
117
|
+
Limited to the archive subtree (where the freshly-moved task lives) plus
|
|
118
|
+
the source task directory's parent area to capture the deletion in the
|
|
119
|
+
same commit. We pass the whole `.trellis/tasks/` path so deletions of the
|
|
120
|
+
pre-move path are tracked, but only as a SPECIFIC subpath — not the whole
|
|
121
|
+
`.trellis/` tree.
|
|
122
|
+
"""
|
|
123
|
+
paths: list[str] = []
|
|
124
|
+
tasks_dir = repo_root / DIR_WORKFLOW / DIR_TASKS
|
|
125
|
+
if tasks_dir.is_dir():
|
|
126
|
+
# The archive copy.
|
|
127
|
+
archive_dir = tasks_dir / DIR_ARCHIVE
|
|
128
|
+
if archive_dir.is_dir():
|
|
129
|
+
paths.append(f"{DIR_WORKFLOW}/{DIR_TASKS}/{DIR_ARCHIVE}")
|
|
130
|
+
# Active tasks (some may have been re-touched, e.g. parent's
|
|
131
|
+
# children list). This captures the source-path deletion too because
|
|
132
|
+
# `git add` on a directory records removals.
|
|
133
|
+
for child in sorted(tasks_dir.iterdir()):
|
|
134
|
+
if not child.is_dir():
|
|
135
|
+
continue
|
|
136
|
+
if child.name == DIR_ARCHIVE:
|
|
137
|
+
continue
|
|
138
|
+
paths.append(f"{DIR_WORKFLOW}/{DIR_TASKS}/{child.name}")
|
|
139
|
+
return paths
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def _stderr_indicates_ignored(stderr: str) -> bool:
|
|
143
|
+
"""git add error indicates the path is excluded by .gitignore."""
|
|
144
|
+
if not stderr:
|
|
145
|
+
return False
|
|
146
|
+
lowered = stderr.lower()
|
|
147
|
+
return "ignored by" in lowered
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def safe_git_add(
|
|
151
|
+
paths: list[str], repo_root: Path
|
|
152
|
+
) -> tuple[bool, bool, str]:
|
|
153
|
+
"""Run `git add` on specific paths; never retry with -f.
|
|
154
|
+
|
|
155
|
+
Returns ``(success, used_force, stderr)``. The ``used_force`` field is
|
|
156
|
+
kept for signature compatibility with the 0.5.10 implementation but is
|
|
157
|
+
always ``False`` — we never auto-force.
|
|
158
|
+
|
|
159
|
+
Behavior:
|
|
160
|
+
- No paths passed → success, no force, empty stderr.
|
|
161
|
+
- Plain ``git add -- <paths>`` succeeds → return success.
|
|
162
|
+
- Plain fails (any reason — ignored or otherwise) → return failure with
|
|
163
|
+
the stderr. Callers should inspect the stderr (see
|
|
164
|
+
:func:`print_gitignore_warning`) and skip the auto-commit.
|
|
165
|
+
"""
|
|
166
|
+
if not paths:
|
|
167
|
+
return True, False, ""
|
|
168
|
+
|
|
169
|
+
rc, _, err = run_git(["add", "--", *paths], cwd=repo_root)
|
|
170
|
+
if rc == 0:
|
|
171
|
+
return True, False, ""
|
|
172
|
+
return False, False, err
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def print_gitignore_warning(paths: list[str]) -> None:
|
|
176
|
+
"""Explain to the user (and any AI reading the log) what to do.
|
|
177
|
+
|
|
178
|
+
CRITICAL: includes the negative example
|
|
179
|
+
``Do NOT use `git add -f .trellis/``` — agents reading the warning are
|
|
180
|
+
known to invent that command, which fans out to ignored caches/backups.
|
|
181
|
+
"""
|
|
182
|
+
print(
|
|
183
|
+
"[WARN] git add failed because .trellis/ paths are ignored by your .gitignore.",
|
|
184
|
+
file=sys.stderr,
|
|
185
|
+
)
|
|
186
|
+
print(
|
|
187
|
+
"[WARN] Skipping auto-commit. The journal/task files were still written to disk;",
|
|
188
|
+
file=sys.stderr,
|
|
189
|
+
)
|
|
190
|
+
print(
|
|
191
|
+
"[WARN] git was not touched.",
|
|
192
|
+
file=sys.stderr,
|
|
193
|
+
)
|
|
194
|
+
print("[WARN]", file=sys.stderr)
|
|
195
|
+
print(
|
|
196
|
+
"[WARN] Trellis manages these specific paths and they should be tracked:",
|
|
197
|
+
file=sys.stderr,
|
|
198
|
+
)
|
|
199
|
+
if paths:
|
|
200
|
+
for p in paths:
|
|
201
|
+
print(f"[WARN] {p}", file=sys.stderr)
|
|
202
|
+
else:
|
|
203
|
+
print(
|
|
204
|
+
"[WARN] .trellis/workspace/<developer>/{journal-*.md,index.md}",
|
|
205
|
+
file=sys.stderr,
|
|
206
|
+
)
|
|
207
|
+
print(
|
|
208
|
+
"[WARN] .trellis/tasks/<task-dir>/",
|
|
209
|
+
file=sys.stderr,
|
|
210
|
+
)
|
|
211
|
+
print(
|
|
212
|
+
"[WARN] .trellis/tasks/archive/",
|
|
213
|
+
file=sys.stderr,
|
|
214
|
+
)
|
|
215
|
+
print("[WARN]", file=sys.stderr)
|
|
216
|
+
print(
|
|
217
|
+
"[WARN] Recommended: change your .gitignore from `.trellis/` to specific",
|
|
218
|
+
file=sys.stderr,
|
|
219
|
+
)
|
|
220
|
+
print(
|
|
221
|
+
"[WARN] subpaths that should remain ignored, e.g.:",
|
|
222
|
+
file=sys.stderr,
|
|
223
|
+
)
|
|
224
|
+
for sub in TRELLIS_IGNORED_SUBPATHS:
|
|
225
|
+
print(f"[WARN] {sub}", file=sys.stderr)
|
|
226
|
+
print("[WARN]", file=sys.stderr)
|
|
227
|
+
print(
|
|
228
|
+
"[WARN] Or, if you intentionally keep .trellis/ local-only, set in",
|
|
229
|
+
file=sys.stderr,
|
|
230
|
+
)
|
|
231
|
+
print(
|
|
232
|
+
"[WARN] .trellis/config.yaml:",
|
|
233
|
+
file=sys.stderr,
|
|
234
|
+
)
|
|
235
|
+
print(
|
|
236
|
+
"[WARN] session_auto_commit: false",
|
|
237
|
+
file=sys.stderr,
|
|
238
|
+
)
|
|
239
|
+
print(
|
|
240
|
+
"[WARN] so the scripts skip git entirely and you can review / commit",
|
|
241
|
+
file=sys.stderr,
|
|
242
|
+
)
|
|
243
|
+
print(
|
|
244
|
+
"[WARN] manually with `git status` / `git add` / `git commit`.",
|
|
245
|
+
file=sys.stderr,
|
|
246
|
+
)
|
|
247
|
+
print("[WARN]", file=sys.stderr)
|
|
248
|
+
print(
|
|
249
|
+
"[WARN] Do NOT use `git add -f .trellis/` — it pulls in backups, worktrees,",
|
|
250
|
+
file=sys.stderr,
|
|
251
|
+
)
|
|
252
|
+
print(
|
|
253
|
+
"[WARN] and runtime caches that should never be committed.",
|
|
254
|
+
file=sys.stderr,
|
|
255
|
+
)
|
|
@@ -14,8 +14,12 @@ Provides:
|
|
|
14
14
|
from __future__ import annotations
|
|
15
15
|
|
|
16
16
|
import json
|
|
17
|
+
import os
|
|
18
|
+
import re
|
|
19
|
+
import subprocess
|
|
17
20
|
from pathlib import Path
|
|
18
21
|
|
|
22
|
+
from .active_task import resolve_context_key
|
|
19
23
|
from .config import get_git_packages
|
|
20
24
|
from .git import run_git
|
|
21
25
|
from .packages_context import get_packages_section
|
|
@@ -40,6 +44,14 @@ from .paths import (
|
|
|
40
44
|
# Helpers
|
|
41
45
|
# =============================================================================
|
|
42
46
|
|
|
47
|
+
_PACKAGE_NAME = "@mindfoldhq/trellis"
|
|
48
|
+
_UPDATE_CHECK_TIMEOUT_SECONDS = 1.0
|
|
49
|
+
_VERSION_RE = re.compile(
|
|
50
|
+
r"^\s*(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:-([0-9A-Za-z.-]+))?\s*$"
|
|
51
|
+
)
|
|
52
|
+
_VERSION_TOKEN_RE = re.compile(r"\b\d+(?:\.\d+){1,2}(?:-[0-9A-Za-z.-]+)?\b")
|
|
53
|
+
|
|
54
|
+
|
|
43
55
|
def _collect_package_git_info(repo_root: Path) -> list[dict]:
|
|
44
56
|
"""Collect git status and recent commits for packages with independent git repos.
|
|
45
57
|
|
|
@@ -109,6 +121,158 @@ def _append_package_git_context(lines: list[str], package_git_info: list[dict])
|
|
|
109
121
|
lines.append("")
|
|
110
122
|
|
|
111
123
|
|
|
124
|
+
def _read_project_version(repo_root: Path) -> str | None:
|
|
125
|
+
try:
|
|
126
|
+
version = (repo_root / DIR_WORKFLOW / ".version").read_text(
|
|
127
|
+
encoding="utf-8"
|
|
128
|
+
).strip()
|
|
129
|
+
except OSError:
|
|
130
|
+
return None
|
|
131
|
+
return version or None
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _fetch_trellis_version_output() -> str | None:
|
|
135
|
+
try:
|
|
136
|
+
result = subprocess.run(
|
|
137
|
+
["trellis", "--version"],
|
|
138
|
+
capture_output=True,
|
|
139
|
+
text=True,
|
|
140
|
+
encoding="utf-8",
|
|
141
|
+
errors="replace",
|
|
142
|
+
timeout=_UPDATE_CHECK_TIMEOUT_SECONDS,
|
|
143
|
+
)
|
|
144
|
+
except (OSError, subprocess.SubprocessError, TimeoutError):
|
|
145
|
+
return None
|
|
146
|
+
|
|
147
|
+
if result.returncode != 0:
|
|
148
|
+
return None
|
|
149
|
+
output = f"{result.stdout}\n{result.stderr}".strip()
|
|
150
|
+
return output or None
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
def _extract_available_update_version(output: str) -> str | None:
|
|
154
|
+
update_match = re.search(
|
|
155
|
+
r"Trellis update available:\s*"
|
|
156
|
+
r"(?P<current>\S+)\s*(?:→|->)\s*(?P<latest>\S+)",
|
|
157
|
+
output,
|
|
158
|
+
)
|
|
159
|
+
if update_match:
|
|
160
|
+
return update_match.group("latest").strip()
|
|
161
|
+
candidates = _VERSION_TOKEN_RE.findall(output)
|
|
162
|
+
return candidates[-1] if candidates else None
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def _resolve_available_update_version() -> str | None:
|
|
166
|
+
output = _fetch_trellis_version_output()
|
|
167
|
+
if not output:
|
|
168
|
+
return None
|
|
169
|
+
return _extract_available_update_version(output)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def _parse_version(version: str) -> tuple[tuple[int, int, int], tuple[str, ...] | None] | None:
|
|
173
|
+
match = _VERSION_RE.match(version)
|
|
174
|
+
if not match:
|
|
175
|
+
return None
|
|
176
|
+
major, minor, patch, prerelease = match.groups()
|
|
177
|
+
numbers = (int(major), int(minor or "0"), int(patch or "0"))
|
|
178
|
+
prerelease_parts = tuple(prerelease.split(".")) if prerelease else None
|
|
179
|
+
return numbers, prerelease_parts
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def _compare_prerelease(
|
|
183
|
+
left: tuple[str, ...] | None,
|
|
184
|
+
right: tuple[str, ...] | None,
|
|
185
|
+
) -> int:
|
|
186
|
+
if left is None and right is None:
|
|
187
|
+
return 0
|
|
188
|
+
if left is None:
|
|
189
|
+
return 1
|
|
190
|
+
if right is None:
|
|
191
|
+
return -1
|
|
192
|
+
|
|
193
|
+
for left_part, right_part in zip(left, right):
|
|
194
|
+
if left_part == right_part:
|
|
195
|
+
continue
|
|
196
|
+
left_numeric = left_part.isdigit()
|
|
197
|
+
right_numeric = right_part.isdigit()
|
|
198
|
+
if left_numeric and right_numeric:
|
|
199
|
+
left_int = int(left_part)
|
|
200
|
+
right_int = int(right_part)
|
|
201
|
+
return (left_int > right_int) - (left_int < right_int)
|
|
202
|
+
if left_numeric:
|
|
203
|
+
return -1
|
|
204
|
+
if right_numeric:
|
|
205
|
+
return 1
|
|
206
|
+
return (left_part > right_part) - (left_part < right_part)
|
|
207
|
+
|
|
208
|
+
return (len(left) > len(right)) - (len(left) < len(right))
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def _compare_versions(left: str, right: str) -> int | None:
|
|
212
|
+
parsed_left = _parse_version(left)
|
|
213
|
+
parsed_right = _parse_version(right)
|
|
214
|
+
if parsed_left is None or parsed_right is None:
|
|
215
|
+
return None
|
|
216
|
+
|
|
217
|
+
left_numbers, left_prerelease = parsed_left
|
|
218
|
+
right_numbers, right_prerelease = parsed_right
|
|
219
|
+
if left_numbers != right_numbers:
|
|
220
|
+
return (left_numbers > right_numbers) - (left_numbers < right_numbers)
|
|
221
|
+
return _compare_prerelease(left_prerelease, right_prerelease)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def _update_marker_path(repo_root: Path) -> Path:
|
|
225
|
+
context_key = resolve_context_key()
|
|
226
|
+
if not context_key:
|
|
227
|
+
terminal_key = os.environ.get("TERM_SESSION_ID", "").strip()
|
|
228
|
+
context_key = terminal_key or f"ppid-{os.getppid()}"
|
|
229
|
+
safe_key = re.sub(r"[^A-Za-z0-9._-]+", "_", context_key).strip("._-")
|
|
230
|
+
if not safe_key:
|
|
231
|
+
safe_key = "session"
|
|
232
|
+
return (
|
|
233
|
+
repo_root
|
|
234
|
+
/ DIR_WORKFLOW
|
|
235
|
+
/ ".runtime"
|
|
236
|
+
/ f"update-check-{safe_key[:160]}.marker"
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
def _mark_update_check_attempted(repo_root: Path) -> bool:
|
|
241
|
+
marker_path = _update_marker_path(repo_root)
|
|
242
|
+
if marker_path.exists():
|
|
243
|
+
return False
|
|
244
|
+
try:
|
|
245
|
+
marker_path.parent.mkdir(parents=True, exist_ok=True)
|
|
246
|
+
marker_path.write_text("checked\n", encoding="utf-8")
|
|
247
|
+
except OSError:
|
|
248
|
+
pass
|
|
249
|
+
return True
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def _get_update_hint(repo_root: Path) -> str | None:
|
|
253
|
+
marker_path = _update_marker_path(repo_root)
|
|
254
|
+
if marker_path.exists():
|
|
255
|
+
return None
|
|
256
|
+
|
|
257
|
+
current_version = _read_project_version(repo_root)
|
|
258
|
+
if not current_version:
|
|
259
|
+
return None
|
|
260
|
+
|
|
261
|
+
latest_version = _resolve_available_update_version()
|
|
262
|
+
if not latest_version:
|
|
263
|
+
return None
|
|
264
|
+
|
|
265
|
+
_mark_update_check_attempted(repo_root)
|
|
266
|
+
comparison = _compare_versions(current_version, latest_version)
|
|
267
|
+
if comparison is None or comparison >= 0:
|
|
268
|
+
return None
|
|
269
|
+
|
|
270
|
+
return (
|
|
271
|
+
f"Trellis update available: {current_version} -> {latest_version}, "
|
|
272
|
+
f"run npm install -g {_PACKAGE_NAME}@latest"
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
|
|
112
276
|
# =============================================================================
|
|
113
277
|
# JSON Output
|
|
114
278
|
# =============================================================================
|
|
@@ -571,4 +735,10 @@ def output_text(repo_root: Path | None = None) -> None:
|
|
|
571
735
|
Args:
|
|
572
736
|
repo_root: Repository root path. Defaults to auto-detected.
|
|
573
737
|
"""
|
|
738
|
+
if repo_root is None:
|
|
739
|
+
repo_root = get_repo_root()
|
|
740
|
+
update_hint = _get_update_hint(repo_root)
|
|
741
|
+
if update_hint:
|
|
742
|
+
print(update_hint)
|
|
743
|
+
print("")
|
|
574
744
|
print(get_context_text(repo_root))
|
|
@@ -24,6 +24,7 @@ from pathlib import Path
|
|
|
24
24
|
|
|
25
25
|
from .config import (
|
|
26
26
|
get_packages,
|
|
27
|
+
get_session_auto_commit,
|
|
27
28
|
is_monorepo,
|
|
28
29
|
resolve_package,
|
|
29
30
|
validate_package,
|
|
@@ -41,6 +42,11 @@ from .paths import (
|
|
|
41
42
|
get_repo_root,
|
|
42
43
|
get_tasks_dir,
|
|
43
44
|
)
|
|
45
|
+
from .safe_commit import (
|
|
46
|
+
print_gitignore_warning,
|
|
47
|
+
safe_archive_paths_to_add,
|
|
48
|
+
safe_git_add,
|
|
49
|
+
)
|
|
44
50
|
from .task_utils import (
|
|
45
51
|
archive_task_complete,
|
|
46
52
|
find_task_by_name,
|
|
@@ -383,13 +389,43 @@ def cmd_archive(args: argparse.Namespace) -> int:
|
|
|
383
389
|
|
|
384
390
|
|
|
385
391
|
def _auto_commit_archive(task_name: str, repo_root: Path) -> None:
|
|
386
|
-
"""Stage
|
|
387
|
-
|
|
388
|
-
|
|
392
|
+
"""Stage Trellis-owned task paths and commit after archive.
|
|
393
|
+
|
|
394
|
+
Only stages specific subpaths (the archive subtree and active task dirs),
|
|
395
|
+
never the whole ``.trellis/`` tree. If ``.gitignore`` blocks the paths,
|
|
396
|
+
we warn + skip — we do NOT retry with ``git add -f``. The warning
|
|
397
|
+
explicitly forbids ``git add -f .trellis/`` (which would fan out to
|
|
398
|
+
caches/backups) and points users at ``session_auto_commit: false``.
|
|
399
|
+
|
|
400
|
+
Honors ``session_auto_commit`` in ``.trellis/config.yaml``: when set to
|
|
401
|
+
``false``, this function returns immediately without touching git
|
|
402
|
+
(the archive directory move on disk is unaffected).
|
|
403
|
+
"""
|
|
404
|
+
if not get_session_auto_commit(repo_root):
|
|
405
|
+
print(
|
|
406
|
+
"[OK] session_auto_commit: false — skipping git stage/commit.",
|
|
407
|
+
file=sys.stderr,
|
|
408
|
+
)
|
|
409
|
+
return
|
|
410
|
+
|
|
411
|
+
paths = safe_archive_paths_to_add(repo_root)
|
|
412
|
+
if not paths:
|
|
413
|
+
print("[OK] No task changes to commit.", file=sys.stderr)
|
|
414
|
+
return
|
|
415
|
+
|
|
416
|
+
success, _, err = safe_git_add(paths, repo_root)
|
|
417
|
+
if not success:
|
|
418
|
+
if err and "ignored by" in err.lower():
|
|
419
|
+
print_gitignore_warning(paths)
|
|
420
|
+
else:
|
|
421
|
+
print(
|
|
422
|
+
f"[WARN] git add failed: {err.strip() if err else 'unknown error'}",
|
|
423
|
+
file=sys.stderr,
|
|
424
|
+
)
|
|
425
|
+
return
|
|
389
426
|
|
|
390
|
-
# Check if there are staged changes
|
|
391
427
|
rc, _, _ = run_git(
|
|
392
|
-
["diff", "--cached", "--quiet", "--",
|
|
428
|
+
["diff", "--cached", "--quiet", "--", *paths], cwd=repo_root
|
|
393
429
|
)
|
|
394
430
|
if rc == 0:
|
|
395
431
|
print("[OK] No task changes to commit.", file=sys.stderr)
|
|
@@ -38,6 +38,7 @@ export declare function scrubOpencodePackageJson(content: string): ScrubResult;
|
|
|
38
38
|
* Scrub `.pi/settings.json`:
|
|
39
39
|
* - drop `enableSkillCommands` (trellis-flagged)
|
|
40
40
|
* - remove trellis entries from `extensions`/`skills`/`prompts` arrays
|
|
41
|
+
* - remove trellis-managed `packages["npm:pi-subagents"]` isolation override
|
|
41
42
|
* - drop arrays that become empty
|
|
42
43
|
*/
|
|
43
44
|
export declare function scrubPiSettings(content: string): ScrubResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall-scrubbers.d.ts","sourceRoot":"","sources":["../../src/utils/uninstall-scrubbers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;CACrB;AAmDD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,IAAI,EAAE,QAAQ,GAAG,MAAM,GACtB,WAAW,CAgGb;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CA+BrE;
|
|
1
|
+
{"version":3,"file":"uninstall-scrubbers.d.ts","sourceRoot":"","sources":["../../src/utils/uninstall-scrubbers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;CACrB;AAmDD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,IAAI,EAAE,QAAQ,GAAG,MAAM,GACtB,WAAW,CAgGb;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CA+BrE;AAiBD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CA4D5D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAoDjE"}
|
|
@@ -201,6 +201,7 @@ export function scrubOpencodePackageJson(content) {
|
|
|
201
201
|
const PI_TRELLIS_EXTENSION = "./extensions/trellis/index.ts";
|
|
202
202
|
const PI_TRELLIS_SKILLS = "./skills";
|
|
203
203
|
const PI_TRELLIS_PROMPTS = "./prompts";
|
|
204
|
+
const PI_SUBAGENTS_PACKAGE = "npm:pi-subagents";
|
|
204
205
|
function isTrellisPiEntry(value, target) {
|
|
205
206
|
return typeof value === "string" && value === target;
|
|
206
207
|
}
|
|
@@ -208,6 +209,7 @@ function isTrellisPiEntry(value, target) {
|
|
|
208
209
|
* Scrub `.pi/settings.json`:
|
|
209
210
|
* - drop `enableSkillCommands` (trellis-flagged)
|
|
210
211
|
* - remove trellis entries from `extensions`/`skills`/`prompts` arrays
|
|
212
|
+
* - remove trellis-managed `packages["npm:pi-subagents"]` isolation override
|
|
211
213
|
* - drop arrays that become empty
|
|
212
214
|
*/
|
|
213
215
|
export function scrubPiSettings(content) {
|
|
@@ -243,6 +245,25 @@ export function scrubPiSettings(content) {
|
|
|
243
245
|
root[key] = filtered;
|
|
244
246
|
}
|
|
245
247
|
}
|
|
248
|
+
const packagesValue = root.packages;
|
|
249
|
+
if (Array.isArray(packagesValue)) {
|
|
250
|
+
const filtered = packagesValue.filter((entry) => {
|
|
251
|
+
if (entry !== null &&
|
|
252
|
+
typeof entry === "object" &&
|
|
253
|
+
!Array.isArray(entry)) {
|
|
254
|
+
const obj = entry;
|
|
255
|
+
return obj.source !== PI_SUBAGENTS_PACKAGE;
|
|
256
|
+
}
|
|
257
|
+
// String entries — keep unless they exactly match the package name
|
|
258
|
+
return entry !== PI_SUBAGENTS_PACKAGE;
|
|
259
|
+
});
|
|
260
|
+
if (filtered.length === 0) {
|
|
261
|
+
delete root.packages;
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
root.packages = filtered;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
246
267
|
const fullyEmpty = Object.keys(root).length === 0;
|
|
247
268
|
return {
|
|
248
269
|
content: JSON.stringify(root, null, 2) + "\n",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall-scrubbers.js","sourceRoot":"","sources":["../../src/utils/uninstall-scrubbers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH;;;;;;;;;;;;;GAaG;AACH,SAAS,yBAAyB,CAChC,OAAe,EACf,YAA+B;IAE/B,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC/B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAEvC,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc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