@calcit/procs 0.12.53 → 0.12.55

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.
Files changed (48) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/README.md +12 -12
  3. package/RFCs/04-13-type-slot-mechanism-rfc.md +519 -115
  4. package/RFCs/04-16-wasm-data-structures.md +1 -1
  5. package/RFCs/07-26-agent-docs-and-evaluation-rfc.md +33 -0
  6. package/RFCs/07-26-agent-machine-protocol-rfc.md +102 -0
  7. package/RFCs/07-26-safe-structured-editing-rfc.md +66 -0
  8. package/RFCs/07-26-static-semantic-analysis-rfc.md +105 -0
  9. package/RFCs/07-28-git-module-store-rfc.md +59 -0
  10. package/RFCs/07-28-persistent-tree-cursor-rfc.md +287 -0
  11. package/RFCs/README.md +9 -3
  12. package/build.rs +89 -7
  13. package/editing-history/2026-07-28-1346-edit-transaction.md +27 -0
  14. package/editing-history/2026-07-28-1454-persistent-tree-cursor.md +30 -0
  15. package/editing-history/2026-07-28-1651-cursor-focus-stack-clipboard.md +30 -0
  16. package/editing-history/2026-07-28-1719-cursor-navigation-search-selection.md +21 -0
  17. package/editing-history/2026-07-28-1958-agent-rfc-split.md +14 -0
  18. package/editing-history/2026-07-28-2004-cursor-editing-docs.md +14 -0
  19. package/editing-history/2026-07-28-2132-cursor-recoverable-clipboard.md +18 -0
  20. package/editing-history/2026-07-28-2151-cursor-native-structural-editing.md +20 -0
  21. package/editing-history/2026-07-28-2158-document-cursor-native-workflows.md +13 -0
  22. package/editing-history/2026-07-29-0022-add-cursor-cli-options.md +7 -0
  23. package/editing-history/2026-07-29-0022-audit-cursor-development-scenarios.md +6 -0
  24. package/editing-history/2026-07-29-0022-complete-cursor-structural-edits.md +8 -0
  25. package/editing-history/2026-07-29-0022-document-cursor-edit-recipes.md +8 -0
  26. package/editing-history/2026-07-29-0022-echo-cursor-commands.md +6 -0
  27. package/editing-history/2026-07-29-0022-edit-target-cursor-alias.md +6 -0
  28. package/editing-history/2026-07-29-0022-guide-agents-through-cursor-workflows.md +7 -0
  29. package/editing-history/2026-07-29-0022-query-from-active-cursor.md +8 -0
  30. package/editing-history/2026-07-29-0022-tree-target-cursor-alias.md +5 -0
  31. package/editing-history/2026-07-29-1242-agent-guide-cold-start-validation.md +15 -0
  32. package/editing-history/2026-07-29-1242-cirru-quote-input-errors.md +13 -0
  33. package/editing-history/2026-07-29-1242-internal-wasm-doc-boundary.md +13 -0
  34. package/editing-history/2026-07-30-1130-pr-281-review-fixes.md +5 -0
  35. package/editing-history/20260729-1421-consolidate-local-state-and-cursor-tools.md +22 -0
  36. package/editing-history/20260729-1422-document-calcit-local-state.md +15 -0
  37. package/editing-history/20260729-1952-strengthen-polymorphism-diagnostics.md +21 -0
  38. package/editing-history/202607301429-entry-type-slots.md +29 -0
  39. package/editing-history/202607301435-release-0.12.54.md +22 -0
  40. package/editing-history/202607301620-program-diff-type-slots.md +6 -0
  41. package/editing-history/202607301959-unify-snapshot-entries.md +7 -0
  42. package/editing-history/202607310027-entry-description.md +7 -0
  43. package/editing-history/202607310032-initialize-entry-descriptions.md +6 -0
  44. package/editing-history/202607310041-entry-functions-as-symbols.md +7 -0
  45. package/editing-history/202607310052-release-0.12.55.md +5 -0
  46. package/lib/package.json +1 -1
  47. package/package.json +1 -1
  48. package/RFCs/07-26-agent-semantic-interface-roadmap-rfc.md +0 -793
@@ -0,0 +1,13 @@
1
+ # 补充 Cursor 原生工作流文档
2
+
3
+ ## 概要
4
+
5
+ - RFC 增加 `cursor apply`、`slurp-next`、`barf-last`、`forward/backward` 的命令契约、复用边界和验收项。
6
+ - Agent 快速指南说明同级导航与跨 list 深度优先导航的区别,并加入 cursor 原生 mutation 的选择建议。
7
+ - tree editing 指南补充完整命令示例、`--cursor-after focus` 的导航反馈,以及 `unwrap` 并非任意 wrapper 的严格逆操作这一边界。
8
+
9
+ ## 验证
10
+
11
+ - `target/debug/cr calcit/test.cirru docs check-md docs/CalcitAgent.md --entry calcit/test.cirru`
12
+ - `target/debug/cr calcit/test.cirru docs check-md docs/run/edit-tree.md --entry calcit/test.cirru`
13
+ - `git diff --check`
@@ -0,0 +1,7 @@
1
+ # Cursor CLI surface
2
+
3
+ - Added symmetric `slurp-prev` and `barf-first` cursor commands.
4
+ - Added `cursor duplicate --at before|after`.
5
+ - Added `--start-path` to structural expression search.
6
+
7
+ Validation for the complete change set: `cargo fmt`, `cargo clippy -- -D warnings`, `cargo test`, `yarn compile`, `yarn check-agent-interface`, and `yarn check-all`.
@@ -0,0 +1,6 @@
1
+ # Audit cursor development scenarios
2
+
3
+ - Mapped the cursor contract to high-frequency development workflows.
4
+ - Specified symmetric Paredit operations, duplication, target aliases, and subtree search.
5
+ - Clarified transaction, source-undo, and concurrent-agent boundaries.
6
+ - Kept workspace, module, and project-wide operations explicit rather than cursor-dependent.
@@ -0,0 +1,8 @@
1
+ # Complete cursor structural edits
2
+
3
+ - Implemented leftward slurp/barf operations and clipboard-preserving duplication.
4
+ - Used staged Snapshot and sidecar writes with explicit partial-success diagnostics.
5
+ - Added reusable active target/path resolution for `@cursor` aliases.
6
+ - Covered selection tracking, invalid boundaries, and parallel-test temporary-directory collisions.
7
+
8
+ The operations were round-trip tested on a temporary copy of `respo-calcit-workflow` with the globally installed `cr`.
@@ -0,0 +1,8 @@
1
+ # Document cursor edit recipes
2
+
3
+ - Added concrete recipes for cursor-aware query, tree, and edit commands.
4
+ - Documented symmetric slurp/barf and clipboard-preserving duplicate operations.
5
+ - Added cursor-scoped leaf and structural searches.
6
+ - Clarified navigation history and multi-agent boundaries.
7
+
8
+ The documented workflow was exercised against a temporary Respo project and finished with a successful JS build.
@@ -0,0 +1,6 @@
1
+ # Cursor command echo
2
+
3
+ - Added machine-readable command echo fields and human explanations for the new cursor operations.
4
+ - Included structural search start paths in echoed query commands.
5
+
6
+ This keeps CLI diagnostics consistent with the existing command protocol.
@@ -0,0 +1,6 @@
1
+ # Edit target cursor alias
2
+
3
+ - Added `@cursor` definition targets to definition, metadata, copy/move, rename, and split operations.
4
+ - Defined the alias as the source for two-target commands while keeping destinations explicit.
5
+ - Reused a single active target/path resolution when an edit references both.
6
+ - Left transaction operation files self-contained with concrete targets and paths.
@@ -0,0 +1,7 @@
1
+ # Guide agents through cursor workflows
2
+
3
+ - Documented cursor target aliases and subtree-scoped search for agents.
4
+ - Added symmetric structural editing and duplication guidance.
5
+ - Clarified that cursor history is navigation-only and the sidecar is not a concurrency primitive.
6
+
7
+ All executable Markdown blocks passed `cr docs check-md`.
@@ -0,0 +1,8 @@
1
+ # Query from the active cursor
2
+
3
+ - Allowed definition-oriented queries to use `@cursor` as their target.
4
+ - Added cursor-scoped structural expression search with absolute result paths.
5
+ - Made `query type-at @cursor --path @cursor` resolve one validated cursor state.
6
+ - Rejected conflicting explicit filters for cursor-scoped searches.
7
+
8
+ Real-project checks covered search selection, type evidence, and bounded semantic context.
@@ -0,0 +1,5 @@
1
+ # Tree target cursor alias
2
+
3
+ - Allowed every target-bearing `cr tree` command to resolve `@cursor` as both definition target and structural path.
4
+ - Reused one validated active cursor when both aliases occur in the same command.
5
+ - Preserved target mismatch rejection for explicit definitions.
@@ -0,0 +1,15 @@
1
+ # Agent guide cold-start validation
2
+
3
+ - Reworked the embedded Agent guide around Snapshot identity, Cirru AST boundaries, query-to-cursor workflows, structural editing, and layered validation.
4
+ - Preserved the high-frequency Cirru rules that fresh agents commonly misapply, while routing lower-frequency operations through live CLI documentation.
5
+ - Added practical cursor guidance for sibling insertion, clipboard state, inherited sidecars, focused previews, invalid navigation, and non-invertible unwrap operations.
6
+ - Corrected error recovery guidance so current stderr takes precedence over stale persisted runtime stacks.
7
+ - Validated the guide through isolated cold-start trials in a real Respo project without committing experimental changes.
8
+
9
+ Validation:
10
+
11
+ - `bash scripts/check-docs-md.sh` (52 files, 286 blocks)
12
+ - `yarn check-agent-interface` (12 scenarios)
13
+ - `cargo test cli_handlers::docs::tests::agents_docs_default_to_the_version_matched_embedded_guide`
14
+ - Isolated `cr --check-only` and `cr js` trials in `respo-calcit-workflow` copies
15
+
@@ -0,0 +1,13 @@
1
+ # Cirru quote input diagnostics
2
+
3
+ - Clarified CLI errors for missing or malformed `quote` transport wrappers.
4
+ - Distinguished symbol, string, and expression payload examples in parser hints.
5
+ - Added coverage for ambiguous bare forms and multi-payload quote input.
6
+
7
+ Validation:
8
+
9
+ - `cargo fmt`
10
+ - `cargo clippy -- -D warnings`
11
+ - `cargo test`
12
+ - `yarn check-all`
13
+
@@ -0,0 +1,13 @@
1
+ # Internal WASM documentation boundary
2
+
3
+ - Removed `cr-wasm` from installation, quick-reference, feature, and public CLI documentation.
4
+ - Kept the WASM backend implementation and validation workflow unchanged.
5
+ - Moved the detailed backend notes under `scripts/` and reframed them as repository-internal validation documentation.
6
+ - Reduced `cr ir` coverage to a short compiler-debugging note instead of presenting it as a normal project workflow.
7
+
8
+ Validation:
9
+
10
+ - `bash scripts/check-docs-md.sh`
11
+ - `yarn check-all`
12
+ - `git diff --check`
13
+
@@ -0,0 +1,5 @@
1
+ # PR 281 review fixes
2
+
3
+ - Guard recursive static definition inference, falling back to `:dynamic` for cycles.
4
+ - Validate dependency module paths before filesystem or Git operations and avoid reporting a reset for untracked-only changes.
5
+ - Correct JS FFI intent classification, bounded cursor state recovery, and CLI/documentation consistency.
@@ -0,0 +1,22 @@
1
+ # Consolidate local state and cursor tools
2
+
3
+ ## Summary
4
+
5
+ - Consolidated project-local sidecar files under `.calcit/`: cursor state now uses `.calcit/cursor.cirru`, and persisted runtime errors use `.calcit/error.cirru`.
6
+ - Added one-time migration from `.calcit-cursor.cirru` and `.calcit-error.cirru` without dual writes.
7
+ - Kept state paths relative to the selected snapshot, including commands invoked from another working directory.
8
+ - Extended cursor schema v4 with one region anchor, up to 16 named marks, and a compact last-query descriptor.
9
+ - Added `cursor anchor`, `clear-anchor`, `region`, `mark`, `goto`, `marks`, and `rm-mark`, plus `query next` and `query prev`.
10
+ - Applied the same path transforms to the active cursor, anchor, and marks during structural edits; stale query continuation is rejected after a snapshot revision change.
11
+ - Bounded the complete cursor file to 64 KiB and retained existing history, stack, and mark count limits.
12
+
13
+ ## Validation
14
+
15
+ - `cargo fmt`
16
+ - `cargo clippy --all-targets -- -D warnings`
17
+ - `cargo test`
18
+ - `yarn compile`
19
+ - `yarn check-all`
20
+ - `yarn check-agent-interface`
21
+ - Real-project regression on a temporary Respo workflow copy, including legacy migration, region/marks/query continuation, and successful `cr js` compilation.
22
+ - Release binary changed from 8,196,752 bytes to 8,280,352 bytes on the same arm64 build environment (about 1.02%).
@@ -0,0 +1,15 @@
1
+ # Document Calcit local state
2
+
3
+ ## Summary
4
+
5
+ - Documented `.calcit/` as the bounded project-local state directory and recommended ignoring the directory as a unit.
6
+ - Updated cursor RFC and Agent guidance for anchor/region, named marks, query continuation, migration behavior, and state-size limits.
7
+ - Moved the recommended multiline snippet location to `.calcit/snippets/`.
8
+ - Updated error-stack references to `.calcit/error.cirru` while preserving historical editing records.
9
+ - Clarified that `.compact-inc.cirru` remains the existing watcher protocol rather than project-local diagnostic state.
10
+ - Corrected repository-local Agent examples and replaced the obsolete binary-size threshold with a same-platform exact-byte baseline comparison.
11
+
12
+ ## Validation
13
+
14
+ - `target/debug/cr docs check-md docs/CalcitAgent.md --entry calcit/test.cirru` (4/4 blocks passed)
15
+ - `git diff --check`
@@ -0,0 +1,21 @@
1
+ # Strengthen polymorphism diagnostics
2
+
3
+ ## Summary
4
+
5
+ - Clarified the static-semantics RFC around parametric generics, trait bounds, applied data types, callback contracts, enums, optionals, and type slots.
6
+ - Restored the intended compatibility rule that legacy `:any` is parsed and serialized as `:dynamic`, rather than acting as a separate static top type.
7
+ - Added generic and trait-bound evidence to type-coverage reports.
8
+ - Added stable aggregate diagnostics for coverage gaps and unresolved dynamic debt, including per-occurrence impact and relationship-aware suggestions for Agents.
9
+ - Reduced false positives from generated metadata namespaces, `defimpl` declarations, and singleton-list wrappers around Cirru data declarations.
10
+ - Updated Agent and feature documentation with a concise workflow for replacing accidental dynamic types with concrete types, type variables, trait bounds, parameterized containers, or enums.
11
+
12
+ ## Validation
13
+
14
+ - `cargo fmt`
15
+ - `cargo clippy -- -D warnings`
16
+ - `cargo test`
17
+ - `yarn compile`
18
+ - `yarn check-agent-interface` (12/12 scenarios)
19
+ - `yarn check-all`
20
+ - `cr docs check-md` for `docs/CalcitAgent.md`, `docs/features/static-analysis.md`, and `docs/features/polymorphism.md`
21
+ - Real-project regression on a temporary Respo workflow copy, including type reports and successful `cr js` compilation.
@@ -0,0 +1,29 @@
1
+ # Entry-level type slots
2
+
3
+ Date: 2026-07-30 14:29 +0800
4
+
5
+ ## Context
6
+
7
+ `with-type-slot` represented a build-wide type choice as a body wrapper. Its single-body and multi-body preprocessing paths diverged, so adding an otherwise meaningless `do` could decide whether a runtime `with-type-slot` call leaked into generated code. Respo also needs the same dispatch `Op` type across a large component call graph without passing generics through every API.
8
+
9
+ ## Changes
10
+
11
+ - Added optional `:type-slots` maps to default and named entry configurations.
12
+ - Added `cr config type-slots`, `set-type-slot`, and `rm-type-slot` commands.
13
+ - Installed the selected entry's bindings before preprocessing and validated configured full type paths after module loading.
14
+ - Kept named entry configurations independent instead of inheriting default bindings.
15
+ - Made `with-type-slot` compile-time-only for both single and multiple bodies; codegen now rejects leaked forms.
16
+ - Preserved unrelated raw Snapshot EDN when a type-slot config command writes its map.
17
+ - Migrated type-slot fixtures and added round-trip, entry isolation, diagnostic, and multi-body erasure coverage.
18
+ - Updated the static-analysis, entry, project-structure, core API, and RFC documentation.
19
+
20
+ ## Validation
21
+
22
+ - `cargo fmt --all`
23
+ - `cargo clippy -- -D warnings`
24
+ - `cargo test`
25
+ - `yarn compile`
26
+ - `yarn check-agent-interface`
27
+ - `yarn check-all`
28
+ - Calcit Markdown checks for the updated static-analysis and entry documentation
29
+ - Respo main/test entry regression, JS codegen, Node tests, and all Markdown code blocks with the new CLI
@@ -0,0 +1,22 @@
1
+ # Release 0.12.54
2
+
3
+ Date: 2026-07-30 14:35 +0800
4
+
5
+ ## Release scope
6
+
7
+ - Entry-level `:type-slots` configuration and CLI management commands.
8
+ - Compile-time-only `with-type-slot` erasure for single and multiple bodies.
9
+ - Snapshot/config preservation, type-slot diagnostics, regression fixtures, and documentation.
10
+ - The earlier PR 281 review fixes already carried by the same branch.
11
+
12
+ ## Pre-release evidence
13
+
14
+ - Feature commit `5e180a2e` passed the repository Test workflow on PR #282.
15
+ - Local validation passed `cargo fmt`, Clippy with warnings denied, all Rust tests, TypeScript compilation, Agent interface checks, and the full Rust/JS/WASM integration suite.
16
+ - Respo passed check-only, JS codegen, Node tests, and all Markdown checks with the new CLI.
17
+
18
+ ## Version changes
19
+
20
+ - `Cargo.toml`: `0.12.54`
21
+ - `package.json`: `0.12.54`
22
+ - `Cargo.lock`: refreshed with `cargo update --workspace`
@@ -0,0 +1,6 @@
1
+ # Program diff 补齐 entry type slots
2
+
3
+ - `SnapshotConfigs.type_slots` 已用于默认 `:configs` 和命名 `:entries`,但 program diff 仍只枚举旧的 `init-fn`、`reload-fn`、`version` 与 `modules` 字段,导致纯 type-slot 修改被误报为无变化。
4
+ - 为字符串 map 增加稳定按 key 排序的结构化 diff,slot 标签保留 `:dispatch-op` 形式;新增或删除整个 entry 时也完整展示其 type slots。
5
+ - `Snapshot` 与 `SnapshotConfigs` 的 program diff 改为无 `..` 的完整字段解构。以后新增字段而未更新 diff 时会产生编译错误,避免同类静默遗漏。
6
+ - 回归测试覆盖默认 entry 的 slot 新增、删除、替换,命名 entry 的 slot 修改,以及新增 entry 时的 slot 详情。
@@ -0,0 +1,7 @@
1
+ # Unify snapshot entries and run modes
2
+
3
+ - Replaced the split top-level `:configs` plus `:entries` model with a single `:entries` map. `:default` is now the required implicit entry and the project version lives at top-level `:version`.
4
+ - Added entry-level `:mode` with the supported values `:native` and `:js`. A bare `cr <snapshot> [--entry name]` now follows the selected entry's mode; the explicit `js` subcommand remains available as an override.
5
+ - Kept legacy snapshot loading compatible: old `:configs` is migrated in memory to `entries.default` with native mode, while canonical writes emit only the unified schema.
6
+ - Updated config/query/diff/type-slot/module selection, embedded core serialization, repository snapshots, bundle/sync scripts, CLI help, RFCs, and user/Agent documentation.
7
+ - Added coverage for new-format round trips, legacy migration, configured JS dispatch, and default-entry module extraction.
@@ -0,0 +1,7 @@
1
+ # Entry description snapshot metadata
2
+
3
+ - `SnapshotEntry` now carries an optional `description` string for semantic context about an executable entry.
4
+ - Existing snapshots without `:description` remain valid and deserialize to an empty string; canonical snapshot writes include the field.
5
+ - Keep the build-script snapshot model synchronized with runtime `SnapshotEntry`, otherwise the embedded core MessagePack snapshot cannot be decoded.
6
+ - `cr config set [--entry <name>] description "..."` updates the field, and `cr config show` displays it.
7
+ - Program diffs expose description changes independently from runtime configuration and type-slot changes.
@@ -0,0 +1,6 @@
1
+ # Initialize entry descriptions in repository snapshots
2
+
3
+ - Installed the current `cr` 0.12.54 binary globally from this checkout.
4
+ - Used `cr <snapshot> config set description ''` to canonicalize every complete `calcit/**/*.cirru` snapshot.
5
+ - The migration updates 58 snapshots and 60 entry configurations, including named entries, with an explicit empty `:description` field.
6
+ - Empty values preserve existing runtime behavior while providing a stable place for future semantic descriptions.
@@ -0,0 +1,7 @@
1
+ # Store entry functions as Calcit symbols
2
+
3
+ - `:init-fn` and `:reload-fn` describe namespace/definition references, so canonical snapshot output now writes them as Cirru EDN symbols such as `'app.main/main!`.
4
+ - Snapshot readers continue to accept the prior string form (`|app.main/main!`) for compatibility.
5
+ - The embedded core-snapshot build model accepts either representation when deserializing entry metadata.
6
+ - Reinstalled `cr` globally and used it to rewrite all `calcit/**/*.cirru` snapshots; 120 entry function references now use symbols.
7
+ - Updated snapshot documentation and round-trip coverage to make the canonical syntax explicit.
@@ -0,0 +1,5 @@
1
+ # Release 0.12.55
2
+
3
+ - Bumped the Rust crate and npm package versions together to `0.12.55`.
4
+ - Refreshed the workspace lockfile before the release commit.
5
+ - This release includes semantic snapshot entry descriptions and canonical symbol storage for entry functions, while preserving legacy string input compatibility.
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.12.53",
3
+ "version": "0.12.55",
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.12.53",
3
+ "version": "0.12.55",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.7.0",