feat: unify source and skills for Dever 0.1.2 installation

This commit is contained in:
Antigravity committed 2026-10-05 02:49:17 +00:00
1 parent a2e0436ed4
commit 19f122b4b4
47 files changed
+1951 -63

No files matched your search

+2 -1
View File
@@ -24,10 +24,11 @@ Applies to AST/HIR contract metadata, typed LLVM/resource/coroutine lowering, pr
- Functions: `name(inputs) (outputs) pure recover("reason")`; modifiers optional, identical across all clauses of one signature. Source has no `async` modifier or `await(...)` form.
- Transaction functions use `transaction name(inputs) (outputs)` and infer a single physical database effect through their complete call graph; source never receives a transaction handle. Sequential `blocking` is allowed only through its existing synchronous/no-database/no-concurrency contract; detached, parallel, stream and channel work remain forbidden.
- Model files synthesize opaque `model.id`, generated `id/created_at`, a record Page type and static short CRUD symbols. Anonymous Model blocks are contextual syntax, not general Map values.
- `Program::api_snapshot() -> String`, `check_api(&str) -> Result<(), String>`, `application_warnings(entry) -> Result<Vec<Diagnostic>, String>`.
- `Program::api_snapshot() -> String`, `check_api(&str) -> Result<(), String>`, `application_errors() -> Result<Vec<Diagnostic>, String>`, `application_warnings(entry) -> Result<Vec<Diagnostic>, String>`.
- Application tests use `test/<component>/<domain>/<topic>.dever[.md]`; the filename selects the one ordinary zero-input, zero-output `<topic>() ()` entry. Test helpers/types remain private to that file. Tests call same-domain App/Domain and cross-domain App only; they cannot call Model operations, Port, Adapter, API or another test, and production cannot call tests.
- Test assertions are compiler-owned `assert(Bool)` and `assert_eq(actual, expected)`. Equality requires the same comparable type; only `null`/empty expressions that already require context receive the left type, so numeric promotion does not make unequal source types valid. Business failures continue through `result(call)` and explicit recovery.
- CLI: `check <root>`, `test <root>`, `run <root> [--tenant <id>] [-- <cmd> <json>]`, `build <root> --output <new-file>`, `tenant migrate <root> <id>`, `tenant owner <root> <id> <site> <user-id>` and `tenant component enable|disable <root> <id> <component>`. Run/build collect checked API/CMD/Job declarations into one generated entry and reject application `main.dever`. Test checks `module/ + test/` before running stable-sorted cases; check/run/build load only module/. Deployment and database settings come only from `config/setting.json`.
- CLI check and application compilation share `Program::application_errors()` before resource preparation: C016 rejects unreachable App/Domain functions and recognized trivial private forwarders or Model CRUD wrappers, not every wrapper shape. Check remains static and offline, with no Worker preparation, runtime pack, native compilation, service or database execution. Test retains its case-local roots and Port fakes without applying production reachability; core library checking still permits exports whose consumers are unknown.
- Module API files contain declarations such as `get profile = app.profile`, `post publish = app.publish`, `cmd bootstrap = app.bootstrap` and `rest model`; they do not contain handler function bodies. HTTP routes inherit the App signature and return the fixed envelope. `public` is valid only on one HTTP declaration. Recursive `api/<site-path>/<topic>.dever` supplies configured site ownership without source `site` statements.
- Authentication providers, sites, external HTTP origins, Cookie names/lifetimes and tenant routing come only from `config/setting.json`. Verify is one read-only App function from `Claims` to an App-owned record with exactly `id: Text`, `user_id: ModelId?`, and `tenant_id: ModelId?`; it cannot return permissions. A protected site's generated entry verifies its configured provider, enters trusted tenant scope, checks every reachable tenant component and authorizes the exact permission before reading business input or dispatching App. A `public` declaration ignores an ambient browser Cookie, but an explicitly supplied invalid `Authorization` credential remains an authentication error.
+13 -5
View File
@@ -30,7 +30,8 @@ Process main is separate from callable roots. Initialize Unix SIGPIPE policy bef
## 2. Signatures
- Project creation: `dever new <new-directory> [--markdown]`; `project::create(&Path, bool)` consumes the single template source under the pinned `skills/assets/template` submodule. The machine launcher selects the active core without reading nonexistent target configuration.
- First installation: root `install` supports `bash install` and `curl -fsSL https://git.dever.cc/shemic/dever/install | bash`, forwarding `--version`, `--release`, `--trusted-key`, `--system-root`, and `--no-start` to the existing Python installer. `python3 sdk/install-entry.py [--check]` generates/verifies the standalone Bash from `skills/scripts/install.py` and the independent public key. Keep one installation implementation.
- Project creation: `dever new <new-directory> [--markdown]`; `project::create(&Path, bool)` consumes the single template source under the ordinary `skills/assets/template` directory in the same repository revision. The machine launcher selects the active core without reading nonexistent target configuration.
- AI guidance: `dever skill path [project-root]` resolves and verifies the active or project-pinned release's `skills/dever-language`; `dever skill install <new-directory>` atomically publishes a stable loader that invokes the absolute machine launcher. Skill resolution is a public read-only operation and must not open the root-only install lock.
- Application target: `dever build <root> --output <new-file> [--target linux-x86_64|linux-aarch64]`; explicit dependency preparation accepts the same target on `dever lib add/install/update/doctor`. Omission selects `BuildTarget::host()`. `CompileRequest.target: BuildTarget` is required and serialized canonically; test requests must use the host.
@@ -81,15 +82,17 @@ Process main is separate from callable roots. Initialize Unix SIGPIPE policy bef
## 3. Contracts
Developer onboarding has two official repositories: `shemic/dever-main` and `shemic/dever-main-skills`. The skill directory is an independent Git repository, pinned by the compiler's submodule; it distinguishes this language from Go Dever. Author `skill` is a required list of `{source,path,sha256}` entries published as signed `skills/dever-language/<path>` artifacts, including SKILL.md; at most 256 files, 1 MiB each and 8 MiB total. New-project source bytes come from the same skill templates; Markdown documentation wraps them without a second semantic copy. Keep the generated configuration CMD-only and free of database/auth prerequisites.
Developer onboarding uses one official source repository, `ssh://git@git.dever.cc:2222/shemic/dever.git`. Its ordinary `skills/` directory is committed and versioned with the compiler, without a submodule or separate skill repository; it distinguishes this language from Go Dever. Author `skill` is a required list of `{source,path,sha256}` entries published as signed `skills/dever-language/<path>` artifacts, including SKILL.md; at most 256 files, 1 MiB each and 8 MiB total. New-project source bytes come from the same skill templates; Markdown documentation wraps them without a second semantic copy. Keep the generated configuration CMD-only and free of database/auth prerequisites.
Official `install` and `update` explicitly download from the compiled GitHub Releases origin; neither project setting.json nor environment variables choose that origin. `dever-release-v2` binds base `artifacts` and optional `extensions` in one signature. Each platform publishes `dever-<platform>.manifest.json`, `.manifest.sig`, `.tar.zst`, plus `.ext-<kind>-<target>.tar.zst`, under immutable version tags `v<major.minor.patch>`. Kind is runtime-pip/npm/go, build-pip/npm, or target; target holds nonhost native runtime/CRT and sandbox. Validate closed IDs, path namespaces, duplicate/overlapping paths, digests and size/count limits in the shared catalog owner. Base retains all four host database profiles, compiler closure, bootstrap, host sandbox and skill. Extensions cannot override base files. Do not fabricate an unsigned merged manifest.
Official `install`, `update` and extension preparation explicitly download from the compiled `https://git.dever.cc/shemic/dever/dist` origin; neither project setting.json nor environment variables choose that origin. Metadata uses `latest/` or `<major.minor.patch>/`; after authentication every payload uses the exact signed version directory, without `v` or `download/`. `dever-release-v2` binds base `artifacts` and optional `extensions` in one signature. Each platform publishes `dever-<platform>.manifest.json`, `.manifest.sig`, `.tar.zst`, plus `.ext-<kind>-<target>.tar.zst`, under immutable version directories. Kind is runtime-pip/npm/go, build-pip/npm, or target; target holds nonhost native runtime/CRT and sandbox. Validate closed IDs, path namespaces, duplicate/overlapping paths, digests and size/count limits in the shared catalog owner. Base retains all four host database profiles, compiler closure, bootstrap, host sandbox and skill. Extensions cannot override base files. Do not fabricate an unsigned merged manifest.
Authenticate the catalog before extraction. Zstandard is a single checksummed frame with window_log_max=27; verify complete compressed EOF/trailer and bounded expansion even after TAR EOF. USTAR contains only its signed ordinary artifact files, with no duplicate, escaping or extra entries; require complete terminator/padding and reject trailing content. Redirects remain on fixed official HTTPS hosts. Publication never replaces another writer's directory. First-install raw `.blob-<sha256>` assets include the launcher and every bootstrap/lib dependency, independently digest-checked before execution. The launcher owns extraction; Python must not implement a second TAR/Zstd parser or require system zstd.
Shared extensions live in service-writable `cache/extensions/<version>/<catalog-sha>/<id>`, outside native cache eviction and immutable core directories. IPC accepts only version and typed ID for an already authenticated installed catalog, never caller URLs/paths/keys. Prepare under the persistent install lock in private staging, verify complete bytes then publish readonly with NOREPLACE; corrupted reuse is an error. `SignedResources` owns verified read/list/root selection for Lib, daemon runtime verification and the actual compile worker. `dever target add linux-aarch64` and explicit dependency preparation may ensure resources; ordinary run/build/read cannot. Update prepares precisely the old active version's installed extension selection before switching the one core/skill active journal; any failure preserves the old selection. Stable launcher/daemon protocol changes require matching trusted bootstrap provisioning. Do not rewrite users' skill directories or add an independently switched skill pointer.
The skill's first-install helper uses its independently distributed public key, verifies the full package before executing bootstrap, and generates only an owned temporary installer config. It never reads business configuration. Real-root installation explicitly starts the machine service unless --no-start is selected; image-root verification must not touch host services. Python/OpenSSL are installer prerequisites, not application runtime dependencies. `sdk/release-assets.py` uses an explicitly supplied author zstd executable and publishes deterministic base/extension/raw assets with Linux NOREPLACE directory rename; it cannot clean another writer's public output.
The skill's first-install helper uses its independently distributed public key, verifies the full package before executing bootstrap, and generates only an owned temporary installer config. The generated Bash entry embeds that same key and passes the original Python source through a quoted heredoc to `/usr/bin/python3 -I -`; parse the complete function before invoking it. Non-root installation uses `/usr/bin/sudo`; help must neither elevate nor download. Missing Python 3.9/OpenSSL, unsupported OS/ABI, unavailable package or invalid signature is an explicit failure. Current x86_64 host packages require glibc 2.39; ARM application support does not establish an ARM compiler-host release. The installer never reads business configuration. Real-root installation explicitly starts the machine service unless --no-start is selected; image-root verification must not touch host services. Python/OpenSSL are installer prerequisites, not application runtime dependencies. `sdk/release-assets.py` uses an explicitly supplied author zstd executable and publishes deterministic base/extension/raw assets with Linux NOREPLACE directory rename; it cannot clean another writer's public output.
Web publication must explicitly serve the generated script at `/shemic/dever/install` and all assets as anonymous HTTPS, independently of source repository access. Redirects are restricted to HTTPS `git.dever.cc` with no credentials, non-443 port or fragment. Publish all immutable version assets before switching latest metadata. Source pushes and local transport tests do not prove public download readiness. Changing the official origin requires rebuilding the stable launcher/daemon and provisioning them once through the new installer; ordinary update activates version payloads but does not replace that bootstrap pair. Never relabel old binaries as a new release.
Native author settings use `dever-native-release-input-v1`: version/target/signing_key, core and `core_libraries` inputs, required base/sqlite/postgres/both archive inputs, and ordered start/libraries/end. Input `source` is a normalized author-relative path and `sha256` is the exact lowercase digest; link inputs also specify the destination `path`. Core libraries use plain SONAME filenames and publish below `lib/`; runtime link inputs remain runtime-relative. Reuse the runtime v1 manifest types and validator. Copy into exclusively owned private staging, verify both source and copied digest, sort manifest artifacts, and sign those exact bytes with the supplied owner-private Ed25519 PKCS#8 key. Reject key content as payload, symlinks, path escape and reserved/duplicate destinations. Keep source paths, key material and timestamps out of release metadata. Linux publication uses atomic NOREPLACE; failures clean only owned staging. No tool invocation, environment configuration, downloads, input hard links or implicit trust-key installation belongs to this owner.
@@ -244,6 +247,7 @@ Create a response-body cancellation owner only after the pending-to-committed st
- New target already exists (including empty directory or dangling symlink), parent is missing, or two creators race: explicit error for the loser; preserve the existing target and remove only owned staging.
- Signature/payload/skill corruption, incomplete archive or absent official asset: explicit failure, no active-version switch or fallback. Publishing source code is not evidence that a downloadable binary release exists.
- Truncated Bash body: no installer or sudo execution. Missing prerequisites: fail before metadata download. Failed authentication through Bash: preserve existing active journal/core/bootstrap and clean only owned staging. Generated entry drift: `sdk/install-entry.py --check` fails. Successful same-version bootstrap may append an activation record; assert selected-version identity rather than a byte-identical journal.
- Project has a pinned version: `skill path <project>` resolves that exact installed version. Foreign users must read matching guidance without obtaining the administrator install lock.
Cross build: unknown/duplicate/missing target arguments fail before execution; absent target packs, wrong ELF/archive machine, unsigned target leaves, incompatible lock/runtime/build receipt and changed target inputs fail before cache reuse or linking. Sandbox loader mode must survive both release packing and embedding; a hash-valid non-executable loader is not a usable Worker resource.
@@ -314,7 +318,7 @@ Cache miss -> compile and publish; changed inputs -> separate key; incomplete/mo
## 5. Good / Base / Bad Cases
Onboarding base: `dever new app` followed by `run app -- hello.greeting.greet '{"name":"Dever"}'` returns the standard envelope with `data:"Hello, Dever"`. Good: --markdown generates equivalent checked declarations; two projects/users share core and skill. Bad: manual main.dever scaffolding, Go service/Page JSON templates, update URLs in project setting.json, or a global skill copied once and allowed to drift from the installed compiler.
Onboarding base: `dever new app` followed by `run app -- hello.greeting.greet '{"name":"Dever"}'` returns the standard envelope with `data:"Hello, Dever"`. Good: --markdown generates equivalent checked declarations; two projects/users share core and skill. Installation good: standalone Bash installs a verified local release into an owned image, then pipe reinstall preserves it. Bad: manual main.dever scaffolding, Go service/Page JSON templates, update URLs in project setting.json, a Git login page served as install, or a global skill copied once and allowed to drift from the installed compiler.
Cross build good: an x86 core uses ARM profiles, ARM Worker assets and x86 Go tools emitting ARM objects. Base: omitted target retains native behavior. Bad: replacing global host identity, executing an ARM build tool on x86, labeling x86 native extensions ARM, or deriving target loader permissions from the host.
@@ -342,6 +346,8 @@ Managed base: a zero-Lib Python/JavaScript Adapter still locks its signed runtim
For onboarding select CLI `new_project`, lib `release_source`, shared-toolchain version/skill tests and native-release skill authoring tests, plus `python3 -B -m unittest discover -s test/onboarding -v`. Assert both formats check/format, no-overwrite concurrency, real CMD/Test/build output, exact signed extraction, corrupt-download retention, project-pinned guidance and foreign-user reads. The foreign-user test lowers only an owned client UID. Bootstrap script tests mock final installation; report that separately from real native-template execution. Do not activate host services or run full release/CI suites as an onboarding check.
For installer-only changes select `test_install*.py`, `toolchain::release_source` and generator `--check`. Assert actual Bash file/pipe help, isolated Python, literal argument/exit-status preservation, non-root sudo dispatch, independent-key authentication, new origin paths and rejected redirects. `verify_install_entry.py` is an opt-in actual signed-payload check: source-free entry, image-only first install, repeat install and corrupt-signature preservation. It uses an existing authenticated release/extractor and no host services; old payloads do not establish new-binary or online update acceptance.
Cross-target changes cover `build_arguments`, native-release target/ELF/mode cases, CompileRequest validation, cache isolation and Lib/Worker target selection. The opt-in `signed_host_compiler_builds_arm_profiles_and_runs_standalone_under_qemu` and `signed_arm_ecosystems_build_offline_standalone_apps_for_system_guest` require explicit author inputs. Run exported Workers/HTTP with `test/ecosystem-release/arm64/simulate.py` under a complete ARM kernel; assert each successful output, source-located expected failure and child cleanup. Do not substitute QEMU user emulation for namespace/seccomp execution or infer physical ARM performance.
Native release changes select `native_release` plus affected private pack/installation checks. Default cases cover deterministic bytes/signature, private-copy ownership, malformed configuration/path/digest/key rejection, cleanup, and concurrent no-overwrite publication. Explicit `native_release::acceptance` consumes prepared optimized archives and author executable; inspect SQLite/PostgreSQL symbols, then repeat packaging, verify signed installation, compile/run all four profiles and run independent outputs after source removal/daemon stop. Report PG-server and cross-host source rebuild evidence separately. Keep native checks and Cargo serial under constrained disk space.
@@ -400,6 +406,8 @@ Command execution observes guard exec through a private CLOEXEC pipe. Bind the P
Wrong: update a skill symlink separately after changing the active core, treat a cached older version as a successful failed update, or delete a public output tree after a publication race. Correct: resolve core and signed skill from one active journal, return the original download failure, and publish exclusively owned staging with NOREPLACE.
Installer wrong: hand-edit generated install logic, take its key from the downloaded package, or assume changing Git remote changes an old launcher. Correct: regenerate from the canonical installer and independent key, then migrate the stable bootstrap pair with a newly built signed release.
Cross-target wrong: check ELF headers but use the host loader name to assign executable mode. Correct: validate target architecture and independently preserve each declared executable's mode across signed packaging, embedding and extraction; exercise the resulting Worker bootstrap under the target kernel.
Native authoring wrong: discover a compiler in PATH while signing, overwrite a completed release, or strip a hard-linked archive in place. Correct: separate the recorded source-build recipe from deterministic copy/verify/sign, preserve link symbols, and publish a wholly new directory with the existing signed installation contract.
@@ -0,0 +1,2 @@
{"file":".trellis/spec/backend/toolchain-and-library.md","reason":"Signed install and source contract"}
{"file":".trellis/spec/backend/quality-guidelines.md","reason":"Validation boundaries and meaningful tests"}
@@ -0,0 +1,19 @@
# 设计
## 唯一安装实现
保留 skills/scripts/install.py 的下载、签名校验、raw launcher 校验与 Rust 解压/bootstrap 调用链。sdk/install-entry.py 从该源码和 skills/assets/release.pub 生成根 install。Bash 只负责 Python 前提检查、必要的 sudo 和把完整 Python 程序通过引用 heredoc 交给 /usr/bin/python3 -I -,参数原样转发。完整函数定义在最后调用前解析,截断的主体不执行安装。
生成器注入独立固定公钥而不是从下载包取公钥;源 skill 的普通 Python 调用仍使用配套公钥文件。Python main 接受内嵌默认公钥参数;具体嵌入使用清晰的源码封装,避免手工复制第二份算法或脆弱的源码字符串替换。
默认版本 latest;元数据为 dist/latest/dever-<platform>.manifest.json 与 .sig;验签后只从 dist/<signed-version>/ 获取基础 archive、raw blobs 和扩展。Rust ReleaseSource 与 Python 使用同一静态协议。只允许官方 HTTPS 同站重定向,禁止凭据、非 443、fragment 和外站。没有环境变量/项目配置覆盖和旧源 fallback。
## 行为与验证边界
机器布局与 bootstrap 事务不变,解压保持在 Rust owner,不增加 shell tar/zstd 解析。帮助不联网、不提权;非 root 安装使用系统 sudo,保留退出状态。沿用 --release、--trusted-key、--system-root、--no-start 做离线镜像验收。
现有真实 0.1.1 split assets 可验证新入口和安装生命周期;旧二进制内部仍指向 GitHub,不能据此声称新源线上 update 已通过。新版本构建发布属后续步骤。服务器须显式映射 /shemic/dever/install 到纯脚本;Git 页面或 raw 登录跳转不是安装脚本。
## 资源
磁盘不足 1 GiB,隔离镜像优先放 /dev/shm 自有临时目录并及时清理,仅保留报告。源码备份 target/install-before.WTVfLC。不得删除其他缓存、改变系统服务或修改 AppArmor 全局状态。仅修改安装、发行源、相关测试和必要文档,不做语言与 skill 约束的邻接改造。
@@ -0,0 +1,3 @@
{"file":".trellis/spec/backend/index.md","reason":"Rust compiler scope and checklist"}
{"file":".trellis/spec/backend/toolchain-and-library.md","reason":"Signed distribution, bootstrap and single ownership"}
{"file":".trellis/spec/backend/quality-guidelines.md","reason":"Focused offline testing and temporary ownership"}
@@ -0,0 +1,52 @@
# 执行与证据
## 授权与起点
- 已在方案与「先实现 install、统一新源」说明之后授权实施并同意任务登记,不重复询问。
- 主仓库 a2e0436、skill 27ac8f2 起点均 clean。
- 备份 target/install-before.WTVfLC/core.tar.gz 与 skills.tar.gz。
## 顺序与所有权
1. [x] trellis-implement:Python 安装器、生成器、根 install、Rust ReleaseSource、根 test/ 定向测试及既有验收 harness 路由。不修改文档、spec、Git 元数据、版本号。
2. [x] 主会话:README、安装说明、SDK 发布说明与规范;真实签名包的新入口自有镜像验收,不修改全局服务。
3. [x] trellis-check:独立检查完整 diff,修复确有的安装/边界/测试缺陷,核验生成物一致性。
4. [x] 主会话:关键证据、必要复验、diff/资源清理、实现验收收口;准确说明线上端点与新包未发布。提交归档随后续迁移统一处理。
## 定向验证
- bash -n install;实际 Bash 文件/管道帮助和失败路径。
- Python onboarding installer 与新增入口定向测试。
- cargo test --offline -p dever-cli --lib toolchain::release_source;修改文件格式检查,不跑全量。
- 真实旧 0.1.1 签名基础包,通过 bash install --release ... --system-root ... --no-start 安装自有镜像。旧二进制不证明新源线上 update。
- 生成器 --check、git diff --check、skill 文档检查。
## 结果
- Python 定向 `python3 -B -m unittest discover -s test/onboarding -p 'test_install*.py' -v`:19/19 通过。包含实际 Bash、真实 Ed25519、独立公钥、字面参数与退出状态、非 root UID help 和进程内 sudo 拦截;没有实际提权/全局服务操作。
- Rust `cargo test --offline -p dever-cli --lib toolchain::release_source`:10/10 通过。实际本地 HTTP 传输断言 latest 两份元数据后从签名准确版本取 archive。复用 target/debug,未跑全量。
- 原有作者 rustfmt 对修改 Rust 文件检查通过。主会话复核生成 --check、bash -n、主/skill diff --check 和 skill quick_validate 均通过。
- `test/onboarding/verify_install_entry.py` 真实 0.1.1 签名资产验收 4/4 通过,报告 `target/install-entry-acceptance.json`:Rust 验签解包准备、独立 Bash 首装且 core/skill 对应、管道重装保持核心与选择、坏签名拒绝且原 journal/core/bootstrap 不变。自有 /dev/shm 临时目录已清理,没有启动全局服务。
- 初次验收报告保留为 `target/install-entry-acceptance-initial.json`。首装通过后,重复安装因测试误要求 active-version 字节完全相同失败;实际 `bootstrap/transaction.rs` 明确追加激活记录。仅修正验收:重复安装比较实际选中版本与负载字节,失败安装仍严格比较 journal 字节。生产安装行为未放宽,重跑完整4阶段通过。
- 根 install 为 13,938 字节,摘要 `3cab983b5093c4a7075f28707042c672a00ce754888ac3e7c9f85853d40ae7eb`;真实验收使用旧版负载,不表示新版本构建、线上安装或线上 update。
- 任务分支 `feat/install-entry`;未提交、推送、改 Git remote 或合并 skills 子仓库。后续迁移发布需新版本 core/launcher/daemon 与完整配套 skill,部署匿名 HTTPS 安装/资产路由。
- 独立 trellis-check 最终无阻塞、未修改产品文件;再次核对生成脚本与真实验收报告 SHA 完全一致,认可 bootstrap 同版本激活记录的测试边界。全部本次验收已满足,未跑全量 clippy、全量 CI 或线上安装。
## 合仓与发行阶段(2026-10-05)
用户已批准前述后续交付方案,继续使用本任务记录,不重复请求创建任务或实施批准。
- [ ] 主会话:当前源码和 Git 历史备份;skills 普通目录化;新远端核验、提交推送;同步安装/源码文档。
- [ ] 发行 worker:准备新版本精简发行,复用既有制作和验收脚本,报告实际包体;不操作 Git、全局安装或服务。
- [ ] 主会话:核对新包及匹配 skill,发布静态端点并完成范围内首装/update 验收。
- [ ] 独立检查、提交、任务证据与归档;部署缺失信息明确记录,未完成的发行项不标成通过。
初始只读证据:新 SSH 仓库 ls-remote 成功且无 refs;HTTPS /shemic/dever/install 返回 404。已询问站点部署方式,等待期间继续合仓与可离线完成的新包准备。系统盘剩约 368 MiB,/dev/shm 约 2.4 GiB,优先复用资产和缓存,不能删除其它项目或部署数据。
### 当前证据
- 备份目录 `target/migration-backup.pBIq3U`:当前源码 tar.gz(不含构建物、Git元数据、密钥与本地配置)、完整 `core.bundle` 和 `skills.bundle` 均验证通过;原 `skills/.git` 移入此目录,保留本地历史和配置。
- `skills/` 已从 gitlink 改成主仓库 22 个普通文件,删除唯一 `.gitmodules` 及本地 submodule 配置。`origin` 已切至新 SSH 地址,旧远端以 `github` 保留;没有向旧远端推送。
- 生成 install `--check`、Bash语法、skill结构和diff检查通过;同仓说明、模板和新源文档已同步。
- 此前 skill约束和CLI接线一并进入本版:`check/run/build` 共用 C016;CLI新增5项及既有1项定向回归通过,CMS普通/Markdown静态check均通过(各7条既有W001)。不扩大冗余判定、不声称所有CRUD包装都可识别。
- 发行版本设为0.1.2,core/launcher/daemon在自有tmpfs目录串行离线重建;不重编未改的runtime。为本轮发行空间,Cargo仅清理本地dever-cli dev构建产物,释放236.7MiB,可从源码恢复;旧release、作者输入和备份保留。
+38
View File
@@ -0,0 +1,38 @@
# Dever 单命令安装入口与官方源迁移
## Goal
实现自包含 Bash install,复用签名安装器并统一 git.dever.cc 下载源,完成隔离定向验证
## 背景与授权
用户要求先实现 install,再处理新 Git 的迁移发布;已收到方案后明确要求实施,并于 2026-10-05 同意任务登记。已有签名 Python 安装器、Rust 解压/bootstrap 和配套 skill 打包可以复用。新 Git SSH 已可访问,远端尚无 refs;HTTPS /install 与公开发行资产尚未部署。
## Requirements
- R1:根 install 可直接通过 Bash 文件或管道执行,无需克隆源码或先安装 skill;支持现有版本选择、本地发行目录、自有镜像和不启动服务选项。
- R2:复用唯一签名安装器和 Rust 解压/bootstrap。独立公钥、签名、摘要、长度、路径验证和失败恢复不得削弱;非 root 使用 sudo,帮助不需要管理员权限。
- R3:首次安装、机器 install/update、按需扩展统一使用 https://git.dever.cc/shemic/dever/dist;latest 只选择签名版本,负载取准确版本目录;不从业务配置或环境变量选择官方源。
- R4:普通 run/build 仍离线,机器共享布局、按需扩展、版本与 skill 同步保持原有合同。安装前检查必要 OS/ABI/工具,清晰报告不支持或未发布。
- R5:安装说明准确区分代码完成与服务器发布;源码下载源迁移不代表已有 0.1.1 二进制已更改。
## Acceptance Criteria
- [x] Bash 语法、直接/管道 help、参数转发、退出状态、非 root 提权与截断脚本行为有最小定向验证。
- [x] 生成物与现有安装器/独立公钥一致,不存在手工维护的第二套安装逻辑。
- [x] Python/Rust 新源 latest/精确版本/扩展地址一致,拒绝非法重定向。
- [x] 真实 Ed25519 校验、损坏拒绝、临时文件清理保持通过;实际签名包可通过新入口安装到自有镜像,不启动宿主服务。
- [x] 必要定向测试和 diff 检查通过,文档说明命令、发布目录、旧版迁移和线上未验证边界。
## 本次边界
先完成 install 及必需下载链路,不执行 Git 迁移/提交/push、skills 子仓库并入、全局安装、Web 服务配置、全量 CI 或正式新版本构建发布。后续必须重建包含新源的二进制,不能将旧包重新标号。源仓库访问限制不变,安装端点与资产需要匿名 HTTPS。
## 2026-10-05 后续交付授权
用户在合仓、Git 迁移、精简发行和线上安装更新验收方案后回复「可以」,本阶段继续实施以下交付。上一阶段的 Git/发布排除仅描述当时范围,不再阻止本阶段工作;仍不运行全量测试、不替换作者机全局服务或安装。
- [ ] 备份当前源码与 skills Git 历史,将 skills 作为普通目录并入主仓库,保留当前约束和模板。
- [ ] 主仓库迁移至 ssh://git@git.dever.cc:2222/shemic/dever.git,提交并推送;不覆盖远端已有历史。
- [ ] 用新版本重建 core/launcher/daemon,复用未改变的已验证 runtime 输入,制作精简基础包、匹配 skill 与可选扩展,记录体积与摘要。
- [ ] 发布安装脚本和签名资产,验证真实 HTTPS 首装与 update 的版本/skill 一致性;若部署接入缺失,保留可发布资产并明确缺失信息,不把本地验收当作上线成功。
@@ -0,0 +1,26 @@
{
"id": "install-entry",
"name": "install-entry",
"title": "Dever 单命令安装入口与官方源迁移",
"description": "实现自包含 Bash install,复用签名安装器并统一 git.dever.cc 下载源,完成隔离定向验证",
"status": "in_progress",
"dev_type": null,
"scope": null,
"package": null,
"priority": "P2",
"creator": "Antigravity",
"assignee": "Antigravity",
"createdAt": "2026-10-05",
"completedAt": null,
"branch": "feat/install-entry",
"base_branch": "main",
"worktree_path": null,
"commit": null,
"pr_url": null,
"subtasks": [],
"children": [],
"parent": null,
"relatedFiles": [],
"notes": "",
"meta": {}
}