@calcit/procs 0.13.18 → 0.13.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/README.md CHANGED
@@ -135,9 +135,10 @@ Related examples and workflows:
135
135
  ```
136
136
 
137
137
  Run `caps` to resolve the recursive dependency graph and install it. Immutable revisions are stored under
138
- `~/.config/calcit/modules/.store/`, while the current project receives links under `.calcit/modules/`.
138
+ `~/.config/calcit/module-caches/`, while the current project receives links under `.calcit/modules/`.
139
139
  Different projects can therefore use different revisions without switching a shared checkout. Existing
140
- `~/.config/calcit/modules/<repo>/` checkouts remain a runtime fallback during migration.
140
+ project module links are the only runtime source for package-style module paths; explicit relative and
141
+ absolute paths retain their normal direct resolution.
141
142
 
142
143
  Published SemVer tags are preferred. Branch refs remain supported for development, but `caps` warns with
143
144
  the resolved commit. When a graph requests several SemVer tags for one repository, the highest requested
@@ -157,8 +158,8 @@ To load modules, use `:modules` configuration and the runtime snapshot file `cal
157
158
  :modules $ [] |memof/calcit.cirru |lilac/
158
159
  ```
159
160
 
160
- Paths defined in `:modules` first load from the snapshot directory's `.calcit/modules/`, then fall back to
161
- `~/.config/calcit/modules/`, i.e. `.calcit/modules/memof/calcit.cirru` or the legacy global path.
161
+ Paths defined in `:modules` load from the snapshot directory's `.calcit/modules/`, e.g.
162
+ `.calcit/modules/memof/calcit.cirru`. Run `caps` to materialize or refresh that project-local view.
162
163
 
163
164
  Modules ending with `/` are automatically suffixed with `calcit.cirru`, and still fall back to `compact.cirru` for compatibility.
164
165
 
@@ -50,21 +50,24 @@ Calcit 继续使用 GitHub repository + Git ref 管理模块,不建设 registr
50
50
 
51
51
  ## 3. 目录模型
52
52
 
53
- 当前正式路径是 `~/.config/calcit/modules/`。新 store 放在它下面,避免再引入
54
- 一套顶级目录;路径解析应集中到一个 helper,后续再考虑 XDG 或其他平台差异。
53
+ `~/.config/calcit/modules/` 保留给 legacy module root;新的不可变 store 使用它的
54
+ 同级路径 `~/.config/calcit/module-caches/`。路径解析应集中到一个 helper,后续再
55
+ 考虑 XDG 或其他平台差异。
55
56
 
56
57
  ```text
57
- ~/.config/calcit/modules/
58
- .store/git/<owner>/<repo>/<commit>/source/
59
- .store/git/<owner>/<repo>/<commit>/realizations/<build-key>/
60
- <repo>/ # legacy clone,迁移期保留
58
+ ~/.config/calcit/
59
+ modules/
60
+ <repo>/ # legacy clone,迁移期保留
61
+ module-caches/
62
+ git/<owner>/<repo>/<commit>/source/
63
+ git/<owner>/<repo>/<commit>/realizations/<build-key>/
61
64
 
62
65
  <project>/
63
66
  deps.cirru
64
67
  .calcit/
65
68
  caps-state.cirru
66
69
  modules/
67
- <repo> -> ~/.config/calcit/modules/.store/.../source/
70
+ <repo> -> ~/.config/calcit/module-caches/.../source/
68
71
  <native-repo> -> .../realizations/<build-key>/
69
72
  tmp/
70
73
  ```
@@ -99,7 +102,7 @@ basename 建立项目链接。如果依赖图里出现 `owner-a/utils` 与 `owne
99
102
 
100
103
  `caps` 按以下顺序修改本机状态:
101
104
 
102
- 1. 在 store 的 `.store/tmp/` 下创建临时目录,解析 ref、下载 source(与 store 同文件系统,保证 rename 原子);项目侧临时 project view 写入 `.calcit/tmp/`;
105
+ 1. 在 store 的 `~/.config/calcit/module-caches/tmp/` 下创建临时目录,解析 ref、下载 source(与 store 同文件系统,保证 rename 原子);项目侧临时 project view 写入 `.calcit/tmp/`;
103
106
  2. 完成递归依赖图和版本选择;
104
107
  3. 完成需要的 native realization 与验证;
105
108
  4. 写入临时 project view;
@@ -0,0 +1,6 @@
1
+ # Project module runtime resolution
2
+
3
+ - `caps` already stores immutable dependency revisions in `~/.config/calcit/modules/.store/` and builds the project's `.calcit/modules/` link view.
4
+ - Runtime loaders must consume only that project view. Retaining a global module fallback can silently run a dependency revision that was not selected by the project's dependency graph.
5
+ - Centralize the project module directory calculation in `calcit::project_module_folder`, then use it for normal execution, WASM codegen, queries, configuration inspection, markdown checks, call-graph comparison, and the Cirru integration harness.
6
+ - Keep explicitly relative and absolute module paths working; only package-style module paths are constrained to the project view.
@@ -0,0 +1,6 @@
1
+ # Visible module versions and cache cleanup
2
+
3
+ - Store immutable module revisions under `~/.config/calcit/modules/versions/` instead of a hidden `.store/` directory, retaining the owner, repository, and resolved commit in the path.
4
+ - Write `metadata.txt` beside each cached revision so the requested reference remains inspectable and global cleanup can select the highest SemVer release without a network request. When one commit is observed through multiple refs, retain the highest observed SemVer ref for cleanup ordering.
5
+ - Add `caps clean` as an explicit global cleanup command. It preserves one newest revision per module (SemVer takes precedence; materialization time breaks non-SemVer ties) and removes older revision directories.
6
+ - Rewrite `~/.config/calcit/modules/AGENTS.md` on each `caps` invocation. The guide treats `versions/` as immutable cache data and directs dependency changes through a repository commit, new tag, dependency update, and reinstall.
@@ -0,0 +1,5 @@
1
+ # Module caches root
2
+
3
+ - Move the global immutable cache from the nested `modules/versions/` proposal to the clearer sibling path `~/.config/calcit/module-caches/`.
4
+ - Keep `~/.config/calcit/modules/` reserved for the legacy module root and per-project link vocabulary; `module-caches/AGENTS.md` is the authoritative generated guidance for cached revisions.
5
+ - Derive the cache root as a sibling of `CALCIT_MODULES_DIR`, so custom test and CI roots preserve the same `modules/` plus `module-caches/` layout.
@@ -0,0 +1,5 @@
1
+ # Module cache review follow-up
2
+
3
+ - Scope `cr docs` module documentation and scope discovery to the current project's `.calcit/modules/` directory, removing the final global fallback.
4
+ - Register each successfully materialized project module view in `module-caches/projects/`; global cleanup preserves every cached revision that remains linked by one of those views.
5
+ - When a cached commit is later resolved through a SemVer tag, refresh its metadata with the highest observed SemVer ref so cleanup ordering stays correct.
@@ -0,0 +1,4 @@
1
+ # Release 0.13.19
2
+
3
+ - Publish the project-scoped module resolution, visible `module-caches` store, safe cleanup, and documentation fixes from PR #364.
4
+ - Keep Cargo and npm package versions synchronized at `0.13.19` for the direct PR-branch release.
@@ -0,0 +1,4 @@
1
+ # Module path resolution documentation
2
+
3
+ - Clarify that project-local `.calcit/modules/` links are mandatory only for package-style module paths.
4
+ - Preserve the documented behavior of explicit relative paths (resolved from the snapshot) and absolute paths (resolved directly).
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.13.18",
3
+ "version": "0.13.19",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.7.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.13.18",
3
+ "version": "0.13.19",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.7.0",