Skip to content

Commit bc966fa

Browse files
authored
[docs] Copy changelog, fix —help scraping (#30)
1 parent 665692d commit bc966fa

10 files changed

Lines changed: 69 additions & 16 deletions

File tree

docs/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
<!-- loosely based on https://keepachangelog.com/en/1.0.0/ -->
4+
5+
## Unreleased
6+
7+
## 0.1.0 - 2025-07-06
8+
9+
- Initial release of persistproc

docs/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ The server exposes the following tools:
9595

9696
| Tool | Description |
9797
| --- | --- |
98-
| `start(command: str, working_directory: str, environment: dict = None, label: str = None)` | Start a new long-running process. |
99-
| `list()` | List all managed processes and their status. |
100-
| `status(pid: int = None, command_or_label: str = None, working_directory: str = None)` | Get the detailed status of a specific process. |
101-
| `stop(pid: int = None, command_or_label: str = None, working_directory: str = None, force: bool = False, label: str = None)` | Stop a running process. |
102-
| `restart(pid: int = None, command_or_label: str = None, working_directory: str = None)` | Stops a process and starts it again with the same parameters. |
103-
| `output(pid: int = None, command_or_label: str = None, stream: str = "combined", lines: int = None, before_time: str = None, since_time: str = None, working_directory: str = None)` | Retrieve captured output from a process. |
104-
| `get_log_paths(pid: int = None, command_or_label: str = None, working_directory: str = None)` | Get the paths to the log files for a specific process. |
105-
| `kill_persistproc()` | Kill all managed processes and get the PID of the persistproc server. |
98+
| start | Start a new long-running process. |
99+
| list | List all managed processes and their status. |
100+
| status | Get the detailed status of a specific process. |
101+
| stop | Stop a running process. |
102+
| restart | Stops a process and starts it again with the same parameters. |
103+
| output | Retrieve captured output from a process. |
104+
| get_log_paths | Get the paths to the log files for a specific process. |
105+
| kill_persistproc | Kill all managed processes and get the PID of the persistproc server. |
106106

107107
## Getting started
108108

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ nav:
88
- Home: index.md
99
- tools.md
1010
- labels.md
11+
- Changelog: CHANGELOG.md
1112

1213
theme:
1314
name: material

persistproc/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ def parse_command_and_args(program: str, args: list[str]) -> tuple[str, list[str
105105
def parse_cli(argv: list[str]) -> tuple[CLIAction, CLIMetadata]:
106106
"""Parse command line arguments and return a CLIAction and metadata."""
107107
parser = argparse.ArgumentParser(
108-
description="Process manager for multi-agent development workflows\n\nDocs: https://steveasleep.com/persistproc"
108+
prog="persistproc",
109+
description="Process manager for multi-agent development workflows\n\nDocs: https://steveasleep.com/persistproc",
109110
)
110111

111112
# ------------------------------------------------------------------

pp

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,23 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
1515
# Change to the script's directory to ensure relative paths work correctly for setup
1616
cd "$SCRIPT_DIR"
1717

18-
# Use mise to sync dependencies if available, otherwise fall back to uv directly
19-
if command -v mise &> /dev/null; then
20-
mise deps:sync
18+
# Check if this is a help command to suppress mise output
19+
if [[ " $* " =~ " --help " ]]; then
20+
# For help commands, run mise silently
21+
if command -v mise &> /dev/null; then
22+
mise deps:sync > /dev/null 2>&1
23+
else
24+
# Fallback: use uv directly, silently
25+
uv sync --extra docs --extra dev > /dev/null 2>&1
26+
fi
2127
else
22-
# Fallback: use uv directly
23-
uv sync --extra docs --extra dev
28+
# Use mise to sync dependencies if available, otherwise fall back to uv directly
29+
if command -v mise &> /dev/null; then
30+
mise deps:sync
31+
else
32+
# Fallback: use uv directly
33+
uv sync --extra docs --extra dev
34+
fi
2435
fi
2536

2637
# Change back to the original directory before running the user's command

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
55
[project]
66
name = "persistproc"
77
version = "0.1.1"
8-
description = "A shared process layer for the modern, multi-agent development workflow (Unix-only)."
8+
description = "A shared process layer for the modern, multi-agent development workflow."
99
readme = "README.md"
1010
requires-python = ">=3.10"
1111
license = { text = "MIT" }
@@ -38,6 +38,7 @@ dev = [
3838
"pytest>=7.0",
3939
"pytest-asyncio>=0.21",
4040
"pytest-cov>=4.0",
41+
"pytest-timeout>=2.1.0",
4142
"pytest-xdist",
4243
"pre-commit>=3.0.0",
4344
"uvicorn>=0.35.0",

pytest.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ python_functions = test_*
66
addopts =
77
--verbose
88
--tb=short
9+
--timeout=120
10+
--maxfail=3
911
markers =
1012
unit: Unit tests
1113
integration: Integration tests

scripts/prepare-docs.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -e
44
# Copy README.md to docs/index.md
55
cp README.md docs/index.md
66

7+
# Copy CHANGELOG.md to docs/
8+
cp CHANGELOG.md docs/
9+
710
# Remove the 'full docs:' link line
811
sed -i.bak '/> Full docs:/d' docs/index.md
912

scripts/update_docs_help.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,19 @@ def get_help_text(command):
2424
print(" ✅") # Complete the progress line
2525

2626
output_lines = result.stdout.splitlines()
27+
28+
# Filter mise and uv dependency installation output
29+
dependency_patterns = [
30+
r"Installing dependencies\.\.\.",
31+
r"^\[deps:sync\]",
32+
r"^\s*\+\s+\w+==", # + package==version
33+
r"^\s*\$\s+uv\s+sync", # $ uv sync commands
34+
]
35+
2736
filtered_output_lines = [
28-
line for line in output_lines if "Installing dependencies..." not in line
37+
line
38+
for line in output_lines
39+
if not any(re.search(pattern, line) for pattern in dependency_patterns)
2940
]
3041
output = "\n".join(filtered_output_lines)
3142

uv.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)