kcode-k1-web-bootstrap-import 0.1.1

Import tree-preserved Loom Web bootstrap packages
Documentation
1
2
3
4
5
6
7
8
9
# Loom Web bootstrap import

`WebBootstrapImporter::import_all(archive, authority, user)` performs the one-time tree-preserving Web migration. Before any publication, it assigns the supplied authority, resolves every dependency against the complete archive, rejects unresolved non-self edges and non-self cycles, derives deterministic dependency-first order, constructs every canonical `SourcePackage`, and computes its complete source digest.

Preparation preserves every original package file except for two metadata changes. `Documentation.md` becomes an exact K1 dependency header followed by the original documentation bytes, and `k1-web.json` is generated with the original entry and test paths. Literal legacy `/module/<name>/v<selector>/<path>` routes in JavaScript, HTML, and CSS become current `/<authority>/<name>/v<selector>/<path>` routes. A dependency on the package itself is omitted from generated K1 metadata when its selector matches the migrating version, because admitted candidate routing already serves that family; its route is still rewritten. A self-reference selecting another version remains an ordinary resolved dependency.

After complete preparation succeeds, each package is staged in the disposable per-user Web coding cache, checked freshly in real Chromium against already-published dependencies, and published through the existing K1 projection. An exact version already present in the projection is accepted only when its complete source bytes match. The returned inventory is dependency-first and records each exact name, stable version, and source digest.

The importer does not bundle source, convert through `CodeDocument`, assume one code file, require a declared dependency to occur in source, reject unused or test-only dependencies, globally reject incidental `/module/` text, impose an arbitrary corpus limit, parse ZIP transport, create Accounts, groups, Profiles, Kmap topology, bootstrap state, source Objects, or Web drafts, deploy a daemon, retry, roll back, repair, or perform background work. Publication is its only durable source effect.