From 8e710fe61f489b95273dde3fff25628ce2c07605 Mon Sep 17 00:00:00 2001 From: EzraX21 Date: Thu, 3 Dec 2026 10:01:51 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=B8=8D=E5=86=8D=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=20agent=20=E5=B7=A5=E4=BD=9C=E5=8C=BA=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=8CREADME=20=E8=A1=A5=20CI=20=E5=BE=BD=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sessions/(7 份 agent 交接记录)和 state/ 是本机工作区产物,提交进公开仓库 只有干扰。改为 gitignore(文件仍保留在本地,不影响本地工作流)。 README 顶部补上 CI 徽章,和 gotify-client-cli 的排版一致。 --- .gitignore | 4 +++ README.md | 1 + sessions/2026-12-03T01-15-12-782Z.md | 34 ------------------ sessions/2026-12-03T01-18-16-988Z.md | 39 --------------------- sessions/2026-12-03T01-23-33-452Z.md | 47 ------------------------- sessions/2026-12-03T01-29-15-858Z.md | 52 ---------------------------- sessions/2026-12-03T01-35-06-452Z.md | 40 --------------------- sessions/2026-12-03T01-41-01-299Z.md | 31 ----------------- sessions/2026-12-03T01-48-56-471Z.md | 25 ------------- state/current.md | 5 --- state/decisions.md | 9 ----- 11 files changed, 5 insertions(+), 282 deletions(-) delete mode 100644 sessions/2026-12-03T01-15-12-782Z.md delete mode 100644 sessions/2026-12-03T01-18-16-988Z.md delete mode 100644 sessions/2026-12-03T01-23-33-452Z.md delete mode 100644 sessions/2026-12-03T01-29-15-858Z.md delete mode 100644 sessions/2026-12-03T01-35-06-452Z.md delete mode 100644 sessions/2026-12-03T01-41-01-299Z.md delete mode 100644 sessions/2026-12-03T01-48-56-471Z.md delete mode 100644 state/current.md delete mode 100644 state/decisions.md diff --git a/.gitignore b/.gitignore index e786457..0cbfe3c 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,7 @@ result.json lan-scan-*-*.tar.gz lan-scan-*-*.zip lan-scan-*-*.sha256 + +# Agent / spec workspace artifacts (local only) +sessions/ +state/ diff --git a/README.md b/README.md index 288f7be..09d2d8e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # lan-scan +[![CI](https://github.com/EzraX21/lan-scan/actions/workflows/ci.yml/badge.svg)](https://github.com/EzraX21/lan-scan/actions/workflows/ci.yml) [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/) [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE) diff --git a/sessions/2026-12-03T01-15-12-782Z.md b/sessions/2026-12-03T01-15-12-782Z.md deleted file mode 100644 index 0433635..0000000 --- a/sessions/2026-12-03T01-15-12-782Z.md +++ /dev/null @@ -1,34 +0,0 @@ -# Session handoff — 2026-12-03T01:15:12.807Z - -- Project: `/home/xin/.dsh/projects/default-workspace-42` -- Agent: `session-6f61ad9e-de0b-4c6b-8dcf-cc14cd735bcd` -- Turn: 1 -- Project: default-workspace-42 - -## What was done -- ?? .gitignore -- ?? .python-version -- ?? .spec/ -- ?? AGENTS.md -- ?? README.md -- ?? openspec/ -- ?? pyproject.toml -- ?? src/ -- ?? state/ -- ?? tests/ -- ?? uv.lock - -## Decisions -- (None recorded.) - -## Open work -- 无阻塞项。注意 Typer 固定为 >=0.19,<0.20,升级前先确认 --help/--version 不再显示 。 - -## Next -- 阅读 openspec/changes/archive/2026-12-03-organize-pyscan/ 了解本次整理范围与设计决策。 -- 新增功能前先为 pyscan-cli 建立 capability spec,再开新的 change。 -- 修改代码后运行:uv sync --extra dev && uv run pytest -q && uv run ruff check . && uv run ruff format --check . -- 验证 CLI:uv run pyscan --help、uv run pyscan health --protocol none。 -- 发布构建:uv build。 - -A later agent resumes from this file plus `state/current.md`, `AGENTS.md`, and the project git log. diff --git a/sessions/2026-12-03T01-18-16-988Z.md b/sessions/2026-12-03T01-18-16-988Z.md deleted file mode 100644 index bd0c9e7..0000000 --- a/sessions/2026-12-03T01-18-16-988Z.md +++ /dev/null @@ -1,39 +0,0 @@ -# Session handoff — 2026-12-03T01:18:16.988Z - -- Project: `/home/xin/.dsh/projects/default-workspace-42` -- Agent: `session-6f61ad9e-de0b-4c6b-8dcf-cc14cd735bcd` -- Turn: 2 -- Project: default-workspace-42 - -## What was done -- M .spec/contextos.json -- M AGENTS.md -- M README.md -- M openspec/changes/archive/2026-12-03-organize-pyscan/design.md -- M openspec/changes/archive/2026-12-03-organize-pyscan/proposal.md -- M openspec/project.md -- M pyproject.toml -- R pyscan/__init__.py -- R pyscan/__main__.py -- R pyscan/cli.py -- R pyscan/config.py -- R pyscan/prober.py -- R pyscan/scanner.py -- M state/current.md -- M state/decisions.md -- ?? openspec/changes/archive/2026-12-03-flatten-pyscan-layout/ - -## Decisions -- (None recorded.) - -## Open work -- 无阻塞项。Typer 固定为 >=0.19,<0.20,升级前先确认 --help/--version 不再显示 。 - -## Next -- 项目已完成整理:根目录 `pyscan/` 包,无 src layout;入口 `pyscan` / `python -m pyscan`。 -- 修改代码后运行:uv sync --extra dev && uv run pytest -q && uv run ruff check . && uv run ruff format --check . -- 验证 CLI:uv run pyscan --help、uv run pyscan health --protocol none。 -- 发布构建:uv build。 -- 后续功能扩展先补 pyscan-cli capability spec,再开新 change。 - -A later agent resumes from this file plus `state/current.md`, `AGENTS.md`, and the project git log. diff --git a/sessions/2026-12-03T01-23-33-452Z.md b/sessions/2026-12-03T01-23-33-452Z.md deleted file mode 100644 index 4b806fd..0000000 --- a/sessions/2026-12-03T01-23-33-452Z.md +++ /dev/null @@ -1,47 +0,0 @@ -# Session handoff — 2026-12-03T01:23:33.453Z - -- Project: `/home/xin/.dsh/projects/default-workspace-42` -- Agent: `session-6f61ad9e-de0b-4c6b-8dcf-cc14cd735bcd` -- Turn: 3 -- Project: default-workspace-42 - -## What was done -- M .gitignore -- M .spec/contextos.json -- M AGENTS.md -- M README.md -- R config.py -- RM main.py -- M openspec/changes/archive/2026-12-03-flatten-pyscan-layout/design.md -- M openspec/changes/archive/2026-12-03-flatten-pyscan-layout/proposal.md -- M openspec/changes/archive/2026-12-03-organize-pyscan/design.md -- M openspec/changes/archive/2026-12-03-organize-pyscan/proposal.md -- M openspec/project.md -- R prober.py -- M pyproject.toml -- D pyscan/__init__.py -- D pyscan/__main__.py -- RM scanner.py -- M state/current.md -- M state/decisions.md -- M tests/test_cli.py -- M tests/test_config.py -- M tests/test_prober.py -- M tests/test_scanner.py -- M uv.lock -- ?? openspec/changes/archive/2026-12-03-flat-modules/ - -## Decisions -- (None recorded.) - -## Open work -- 无阻塞项。Typer 固定为 >=0.19,<0.20,升级前先确认 --help/--version 不再显示 。 - -## Next -- 项目为根目录平铺结构:main.py / config.py / prober.py / scanner.py,不打包安装。 -- 首次使用:uv sync(开发加 --extra dev),然后 uv run python main.py --help 或激活 .venv 后 python main.py --help。 -- 修改代码后运行:uv run pytest -q、uv run ruff check .、uv run ruff format --check .。 -- 验证 CLI:uv run python main.py --version、uv run python main.py health --protocol none。 -- 后续功能扩展先补 pyscan-cli capability spec,再开新 change。 - -A later agent resumes from this file plus `state/current.md`, `AGENTS.md`, and the project git log. diff --git a/sessions/2026-12-03T01-29-15-858Z.md b/sessions/2026-12-03T01-29-15-858Z.md deleted file mode 100644 index 029981b..0000000 --- a/sessions/2026-12-03T01-29-15-858Z.md +++ /dev/null @@ -1,52 +0,0 @@ -# Session handoff — 2026-12-03T01:29:15.859Z - -- Project: `/home/xin/.dsh/projects/default-workspace-42` -- Agent: `session-6f61ad9e-de0b-4c6b-8dcf-cc14cd735bcd` -- Turn: 3 -- Project: default-workspace-42 - -## What was done -- M .gitignore -- M .spec/contextos.json -- M AGENTS.md -- M README.md -- M openspec/changes/archive/2026-12-03-flatten-pyscan-layout/design.md -- M openspec/changes/archive/2026-12-03-flatten-pyscan-layout/proposal.md -- M openspec/changes/archive/2026-12-03-organize-pyscan/design.md -- M openspec/changes/archive/2026-12-03-organize-pyscan/proposal.md -- M openspec/project.md -- M pyproject.toml -- D pyscan/__init__.py -- D pyscan/__main__.py -- R src/pyscan/cli.py -- R src/pyscan/config.py -- R src/pyscan/prober.py -- R src/pyscan/scanner.py -- M state/current.md -- M state/decisions.md -- M uv.lock -- ?? .github/ -- ?? .pre-commit-config.yaml -- ?? CHANGELOG.md -- ?? LICENSE -- ?? openspec/changes/archive/2026-12-03-flat-modules/ -- ?? openspec/changes/archive/2026-12-03-reference-architecture/ -- ?? sessions/2026-12-03T01-23-33-452Z.md -- ?? src/pyscan/__init__.py -- ?? src/pyscan/__main__.py -- ?? src/pyscan/_entry.py - -## Decisions -- (None recorded.) - -## Open work -- 无阻塞项。Typer 固定为 >=0.19,<0.20,升级前先确认 --help/--version 不再显示 。 - -## Next -- 最终架构:src/pyscan 包,console script `pyscan`,同时支持 `python -m pyscan`;构建用 uv_build,MIT 许可证。 -- 首次使用:uv sync --extra dev(或 uv tool install .)。 -- 验证:uv run pytest -q、uv run ruff check .、uv run ruff format --check .、uv run pyscan --version、uv run pyscan health --protocol none。 -- 构建:uv build,wheel 内应包含 `pyscan` 包、LICENSE 和 `pyscan = pyscan._entry:main` 入口。 -- 后续功能扩展先补 pyscan-cli capability spec,再开新 change。 - -A later agent resumes from this file plus `state/current.md`, `AGENTS.md`, and the project git log. diff --git a/sessions/2026-12-03T01-35-06-452Z.md b/sessions/2026-12-03T01-35-06-452Z.md deleted file mode 100644 index 2170e82..0000000 --- a/sessions/2026-12-03T01-35-06-452Z.md +++ /dev/null @@ -1,40 +0,0 @@ -# Session handoff — 2026-12-03T01:35:06.453Z - -- Project: `/home/xin/.dsh/projects/default-workspace-42` -- Agent: `session-6f61ad9e-de0b-4c6b-8dcf-cc14cd735bcd` -- Turn: 4 -- Project: default-workspace-42 - -## What was done -- M .github/workflows/ci.yml -- M .gitignore -- M .spec/contextos.json -- M AGENTS.md -- M CHANGELOG.md -- M README.md -- M openspec/project.md -- M pyproject.toml -- M state/current.md -- M state/decisions.md -- M uv.lock -- ?? .github/workflows/release.yml -- ?? install.ps1 -- ?? install.sh -- ?? openspec/changes/archive/2026-12-03-release-packaging/ -- ?? packaging/ -- ?? pyscan.spec - -## Decisions -- (None recorded.) - -## Open work -- install.ps1 未在 Linux 上实际执行,只做了静态检查;首次 Windows 发布时建议在 Windows 上跑一遍 irm 安装。仓库名若不用 EzraX21/pyscan,需要改 install.sh 的 REPO 默认值和 README 中的 URL。 - -## Next -- 发布链路:PyInstaller spec + release.yml 在 v* tag 时构建 pyscan-linux-x64 / pyscan-windows-x64 / pyscan-macos-arm64,并生成 SHA256。 -- 安装脚本:install.sh(Linux/macOS)与 install.ps1(Windows),默认仓库 EzraX21/pyscan,可用 --repo / PYSCAN_REPO 覆盖。 -- 本地验证:uv sync --all-extras;uv run pyinstaller --clean --noconfirm pyscan.spec;./dist/pyscan --version。 -- 常规验证:uv run pytest -q、uv run ruff check src tests packaging、uv run ruff format --check src tests packaging、uv build。 -- 首次发布:创建 GitHub 仓库并推送,打 v0.2.0 tag,等待 release workflow 产出三个平台文件。 - -A later agent resumes from this file plus `state/current.md`, `AGENTS.md`, and the project git log. diff --git a/sessions/2026-12-03T01-41-01-299Z.md b/sessions/2026-12-03T01-41-01-299Z.md deleted file mode 100644 index 0f587fd..0000000 --- a/sessions/2026-12-03T01-41-01-299Z.md +++ /dev/null @@ -1,31 +0,0 @@ -# Session handoff — 2026-12-03T01:41:01.300Z - -- Project: `/home/xin/.dsh/projects/default-workspace-42` -- Agent: `session-6f61ad9e-de0b-4c6b-8dcf-cc14cd735bcd` -- Turn: 5 -- Project: default-workspace-42 - -## What was done -- M .spec/contextos.json -- M AGENTS.md -- D openspec/changes/rename-lan-scan/design.md -- D openspec/changes/rename-lan-scan/proposal.md -- D openspec/changes/rename-lan-scan/tasks.md -- M state/current.md -- M state/decisions.md -- ?? openspec/changes/archive/2026-12-03-rename-lan-scan/ - -## Decisions -- (None recorded.) - -## Open work -- 发布前确认 GitHub Actions 对 release workflow 有 contents: write 权限;macOS 产物未签名,README 已加 quarantine 提示。install.ps1 仍未在 Windows 实跑。 - -## Next -- GitHub 仓库:https://github.com/EzraX21/lan-scan(public,main)。 -- 命名:发行包/仓库 lan-scan,Python 包 lan_scan,命令 lan-scan,模块 python -m lan_scan;环境变量 LAN_SCAN_*,配置 ~/.config/lan-scan/config.json。 -- 验证:uv sync --all-extras && uv run pytest -q;uv run lan-scan --version;uv build;uv run pyinstaller --clean --noconfirm lan-scan.spec。 -- 首次发布:git tag v0.2.0 && git push origin v0.2.0,然后查看 release workflow 产物。 -- 安装:install.sh / install.ps1 默认仓库已改为 EzraX21/lan-scan。 - -A later agent resumes from this file plus `state/current.md`, `AGENTS.md`, and the project git log. diff --git a/sessions/2026-12-03T01-48-56-471Z.md b/sessions/2026-12-03T01-48-56-471Z.md deleted file mode 100644 index 3d4a1f8..0000000 --- a/sessions/2026-12-03T01-48-56-471Z.md +++ /dev/null @@ -1,25 +0,0 @@ -# Session handoff — 2026-12-03T01:48:56.471Z - -- Project: `/home/xin/.dsh/projects/default-workspace-42` -- Agent: `session-6f61ad9e-de0b-4c6b-8dcf-cc14cd735bcd` -- Turn: 5 -- Project: default-workspace-42 - -## What was done -- M AGENTS.md -- M state/current.md - -## Decisions -- (None recorded.) - -## Open work -- macOS 的 v0.2.0 重新构建任务可能仍在 GitHub 排队;已有旧 macOS 产物可用。install.ps1 仍未在 Windows 实跑。Windows 非 UTF-8 输出崩溃已修复并由 release smoke test 验证。 - -## Next -- 仓库:https://github.com/EzraX21/lan-scan;Release v0.2.0 已有三平台单文件 + SHA256。 -- 一键安装:curl -fsSL https://raw.githubusercontent.com/EzraX21/lan-scan/main/install.sh | sh(Windows 用 install.ps1)。 -- README 演示:docs/demo.gif;用 agg + Noto Sans Mono CJK 渲染,源码在 README 的「🎬 演示」。 -- 验证:uv sync --all-extras && uv run pytest -q(56 个);uv run ruff check src tests packaging;uv build;uv run pyinstaller --clean --noconfirm lan-scan.spec。 -- 后续:如需重新生成 GIF,参考会话中 .demo-work 的 cast/agg 命令(临时目录已清理)。 - -A later agent resumes from this file plus `state/current.md`, `AGENTS.md`, and the project git log. diff --git a/state/current.md b/state/current.md deleted file mode 100644 index 1b2d2ce..0000000 --- a/state/current.md +++ /dev/null @@ -1,5 +0,0 @@ -# Current state - -- Focus: 仓库:https://github.com/EzraX21/lan-scan;Release v0.2.0 已有三平台单文件 + SHA256。 -- Last handoff: `sessions/2026-12-03T01-48-56-471Z.md` -- Open changes: 0 diff --git a/state/decisions.md b/state/decisions.md deleted file mode 100644 index 5738058..0000000 --- a/state/decisions.md +++ /dev/null @@ -1,9 +0,0 @@ -# Decisions - -- 2026-12-03: GitHub 仓库 `EzraX21/lan-scan` 已创建并推送 `main`(public),topics:python / cli / lan / scanner / typer。 -- 2026-12-03: 项目定名 `lan-scan`:仓库 `EzraX21/lan-scan`、包 `lan_scan`、命令 `lan-scan`;采用 `src/lan_scan/` + `uv_build`,MIT 许可证。 -- 2026-12-03: 发布走 GitHub Release 单文件(PyInstaller),另提供 install.sh / install.ps1;不发布到 PyPI。 -- 2026-12-03: 配置默认路径改为平台配置目录下的 `lan-scan` 目录,保留 `~/.lan-scanner.json` 读取兼容;环境变量统一为 `LAN_SCAN_*`。 -- 2026-12-03: 依赖固定 `typer>=0.19,<0.20`,规避新版把 `--help`/`--version` 渲染成 `` 的回归。 -- 2026-12-03: 扫描器通过 `Prober` Protocol 注入探测实现,测试不依赖真实网络。 -- 2026-12-03: 移除压缩包自带的 `.venv/` 与无提交的 `.git/`,仓库由项目 keeper 管理。