Skip to content

feat(pack): kind=skills content packs + depth-1 dependency resolution (GH #727) - #743

Merged
yvgude merged 2 commits into
mainfrom
feat/unified-distribution-p3
Jul 6, 2026
Merged

feat(pack): kind=skills content packs + depth-1 dependency resolution (GH #727)#743
yvgude merged 2 commits into
mainfrom
feat/unified-distribution-p3

Conversation

@yvgude

@yvgude yvgude commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Closes #727 — Phase 3 of the Unified Distribution epic (#724).

kind=skills — verified content packs

  • content.documents payload: per-file DocumentBlob (path, sha256 of plaintext, zstd+base64 body) with hard caps (64 files / 256 KiB per file / 1 MiB total)
  • Kind coherence enforced both ways: kind=skills requires documents, all other kinds must not carry it
  • pack create --kind skills --name @ns/name --from <dir> — deterministic, signed build from a directory (hidden/VCS files skipped, sorted walk, redaction pipeline applied)
  • Install materializes the verified blobs read-only under packages/skills/<name>/<version>/ before the index is touched — a tampered blob aborts the whole install, never leaving a half-registered package
  • pack remove cleans the materialized tree with the package
  • Path safety: absolute paths, .., .ctxpkg names and >6 depth are refused

Depth-1 dependency resolution (deliberately non-transitive)

  • deps.rs: SemVer ranges via the semver crate — highest non-yanked match wins; self-dependencies and unscoped names refused; optional deps skipped
  • pack install <ns>/<name> resolves declared deps after the root; everything lands in ctxpkg.lock
  • Offline-reproducible: locked + in-store deps skip the network; an unpinned re-install with a store hit never fetches
  • pack update <ns>/<name> refreshes root + deps to the newest matching versions
  • addon add <ns>/<name>: declared deps join the consent preview and install after wiring; addon update refreshes deps even when the addon binary is already current

Verification

  • 7424 lib tests green, clippy --all-features -D warnings clean, doc + gen_docs + Windows cross-compile green
  • E2E against a local registry: install-with-dep → both pinned; offline reinstall with the registry down; dep-only version bump picked up by pack update; tamper → refused; materialized files read-only

Follow-ups (deliberately out of scope)

Made with Cursor

yvgude and others added 2 commits July 6, 2026 22:05
… (GH #727)

Phase 3 of the Unified Distribution (#724):

kind=skills — verified content packs:
- content.documents payload: per-file DocumentBlob (path, sha256 of
  plaintext, zstd+base64 body) with hard caps (64 files / 256 KiB file /
  1 MiB total); kind coherence enforced both ways
- pack create --kind skills --name @ns/name --from <dir>: deterministic,
  signed build from a directory (hidden/VCS files skipped, sorted walk)
- install materializes blobs read-only under packages/skills/<name>/<ver>
  before the index is touched; a tampered blob aborts the whole install
- pack remove cleans the materialized tree with the package
- path safety: rejects absolute/.. paths, .ctxpkg store names, >6 depth;
  bodies pass the standard redaction pipeline at build time

Depth-1 dependency resolution (deliberately non-transitive):
- deps.rs: SemVer ranges via semver crate — highest non-yanked match;
  self-dependency and unscoped names refused; optional deps skipped
- pack install <ns>/<name>: resolves declared deps after the root,
  everything lands in ctxpkg.lock (root + deps pinned)
- offline-reproducible: locked + in-store deps skip the network; an
  unpinned re-install with a store hit never fetches (pack update does)
- pack update <ns>/<name>: refreshes root + deps to newest matches
- addon add <ns>/<name>: declared deps join the consent preview and
  install after wiring; addon update refreshes deps even when the addon
  binary itself is already current

E2E-verified against a local registry: install-with-dep, lockfile pins,
offline reinstall (server down), dep-only version bump via pack update,
tamper refusal, read-only materialization.

Co-authored-by: Cursor <cursoragent@cursor.com>
…LOC gate)

pack_cmd.rs crossed the 1500-line CI gate after the depth-1 dependency
resolution landed. The remote-install path (cmd_pack_install_remote,
install_declared_dependencies, cmd_pack_update) is a cohesive unit — it
moves to cli/pack_remote.rs unchanged; pack_cmd keeps the local store,
create, import/export and A2A commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
@yvgude
yvgude merged commit 683113f into main Jul 6, 2026
26 checks passed
@yvgude
yvgude deleted the feat/unified-distribution-p3 branch July 6, 2026 21:24
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unified Distribution Phase 3: kind=skills + cross-kind dependency resolution (lean-md reference case)

1 participant