@ibgib/vcs-gib 0.0.6

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 (202) hide show
  1. package/README.md +94 -0
  2. package/VCS_CLI_USER_GUIDE.md +198 -0
  3. package/dist/AUTO-GENERATED-version.d.mts +6 -0
  4. package/dist/AUTO-GENERATED-version.d.mts.map +1 -0
  5. package/dist/AUTO-GENERATED-version.mjs +6 -0
  6. package/dist/AUTO-GENERATED-version.mjs.map +1 -0
  7. package/dist/assumptions.respec.d.mts +2 -0
  8. package/dist/assumptions.respec.d.mts.map +1 -0
  9. package/dist/assumptions.respec.mjs +41 -0
  10. package/dist/assumptions.respec.mjs.map +1 -0
  11. package/dist/bootstrap/node-bootstrap.d.mts +35 -0
  12. package/dist/bootstrap/node-bootstrap.d.mts.map +1 -0
  13. package/dist/bootstrap/node-bootstrap.mjs +165 -0
  14. package/dist/bootstrap/node-bootstrap.mjs.map +1 -0
  15. package/dist/bootstrap/node-bootstrap.respec.node.d.mts +7 -0
  16. package/dist/bootstrap/node-bootstrap.respec.node.d.mts.map +1 -0
  17. package/dist/bootstrap/node-bootstrap.respec.node.mjs +28 -0
  18. package/dist/bootstrap/node-bootstrap.respec.node.mjs.map +1 -0
  19. package/dist/cli/cli-arg-parser.d.mts +27 -0
  20. package/dist/cli/cli-arg-parser.d.mts.map +1 -0
  21. package/dist/cli/cli-arg-parser.mjs +96 -0
  22. package/dist/cli/cli-arg-parser.mjs.map +1 -0
  23. package/dist/cli/cli-arg-parser.respec.node.d.mts +7 -0
  24. package/dist/cli/cli-arg-parser.respec.node.d.mts.map +1 -0
  25. package/dist/cli/cli-arg-parser.respec.node.mjs +35 -0
  26. package/dist/cli/cli-arg-parser.respec.node.mjs.map +1 -0
  27. package/dist/cli/cli-constants.d.mts +26 -0
  28. package/dist/cli/cli-constants.d.mts.map +1 -0
  29. package/dist/cli/cli-constants.mjs +67 -0
  30. package/dist/cli/cli-constants.mjs.map +1 -0
  31. package/dist/cli/cli-e2e.respec.node.d.mts +8 -0
  32. package/dist/cli/cli-e2e.respec.node.d.mts.map +1 -0
  33. package/dist/cli/cli-e2e.respec.node.mjs +263 -0
  34. package/dist/cli/cli-e2e.respec.node.mjs.map +1 -0
  35. package/dist/cli/commands/add-cmd.d.mts +20 -0
  36. package/dist/cli/commands/add-cmd.d.mts.map +1 -0
  37. package/dist/cli/commands/add-cmd.mjs +333 -0
  38. package/dist/cli/commands/add-cmd.mjs.map +1 -0
  39. package/dist/cli/commands/branch-checkout-cmd.respec.node.d.mts +7 -0
  40. package/dist/cli/commands/branch-checkout-cmd.respec.node.d.mts.map +1 -0
  41. package/dist/cli/commands/branch-checkout-cmd.respec.node.mjs +288 -0
  42. package/dist/cli/commands/branch-checkout-cmd.respec.node.mjs.map +1 -0
  43. package/dist/cli/commands/branch-cmd.d.mts +25 -0
  44. package/dist/cli/commands/branch-cmd.d.mts.map +1 -0
  45. package/dist/cli/commands/branch-cmd.mjs +187 -0
  46. package/dist/cli/commands/branch-cmd.mjs.map +1 -0
  47. package/dist/cli/commands/checkout-cmd.d.mts +21 -0
  48. package/dist/cli/commands/checkout-cmd.d.mts.map +1 -0
  49. package/dist/cli/commands/checkout-cmd.mjs +154 -0
  50. package/dist/cli/commands/checkout-cmd.mjs.map +1 -0
  51. package/dist/cli/commands/commit-cmd.d.mts +23 -0
  52. package/dist/cli/commands/commit-cmd.d.mts.map +1 -0
  53. package/dist/cli/commands/commit-cmd.mjs +326 -0
  54. package/dist/cli/commands/commit-cmd.mjs.map +1 -0
  55. package/dist/cli/commands/commit-log-cmd.respec.node.d.mts +7 -0
  56. package/dist/cli/commands/commit-log-cmd.respec.node.d.mts.map +1 -0
  57. package/dist/cli/commands/commit-log-cmd.respec.node.mjs +251 -0
  58. package/dist/cli/commands/commit-log-cmd.respec.node.mjs.map +1 -0
  59. package/dist/cli/commands/init-cmd.d.mts +20 -0
  60. package/dist/cli/commands/init-cmd.d.mts.map +1 -0
  61. package/dist/cli/commands/init-cmd.mjs +119 -0
  62. package/dist/cli/commands/init-cmd.mjs.map +1 -0
  63. package/dist/cli/commands/init-cmd.respec.node.d.mts +7 -0
  64. package/dist/cli/commands/init-cmd.respec.node.d.mts.map +1 -0
  65. package/dist/cli/commands/init-cmd.respec.node.mjs +40 -0
  66. package/dist/cli/commands/init-cmd.respec.node.mjs.map +1 -0
  67. package/dist/cli/commands/log-cmd.d.mts +27 -0
  68. package/dist/cli/commands/log-cmd.d.mts.map +1 -0
  69. package/dist/cli/commands/log-cmd.mjs +146 -0
  70. package/dist/cli/commands/log-cmd.mjs.map +1 -0
  71. package/dist/cli/commands/status-add-cmd.respec.node.d.mts +7 -0
  72. package/dist/cli/commands/status-add-cmd.respec.node.d.mts.map +1 -0
  73. package/dist/cli/commands/status-add-cmd.respec.node.mjs +215 -0
  74. package/dist/cli/commands/status-add-cmd.respec.node.mjs.map +1 -0
  75. package/dist/cli/commands/status-cmd.d.mts +25 -0
  76. package/dist/cli/commands/status-cmd.d.mts.map +1 -0
  77. package/dist/cli/commands/status-cmd.mjs +286 -0
  78. package/dist/cli/commands/status-cmd.mjs.map +1 -0
  79. package/dist/cli/vcs-cli-main.d.mts +14 -0
  80. package/dist/cli/vcs-cli-main.d.mts.map +1 -0
  81. package/dist/cli/vcs-cli-main.mjs +136 -0
  82. package/dist/cli/vcs-cli-main.mjs.map +1 -0
  83. package/dist/engine/branch/branch-graph-helper.d.mts +19 -0
  84. package/dist/engine/branch/branch-graph-helper.d.mts.map +1 -0
  85. package/dist/engine/branch/branch-graph-helper.mjs +49 -0
  86. package/dist/engine/branch/branch-graph-helper.mjs.map +1 -0
  87. package/dist/engine/branch/branch-helper.d.mts +26 -0
  88. package/dist/engine/branch/branch-helper.d.mts.map +1 -0
  89. package/dist/engine/branch/branch-helper.mjs +57 -0
  90. package/dist/engine/branch/branch-helper.mjs.map +1 -0
  91. package/dist/engine/branch/branch-space-helper.d.mts +22 -0
  92. package/dist/engine/branch/branch-space-helper.d.mts.map +1 -0
  93. package/dist/engine/branch/branch-space-helper.mjs +77 -0
  94. package/dist/engine/branch/branch-space-helper.mjs.map +1 -0
  95. package/dist/engine/branch/branch-space.respec.node.d.mts +8 -0
  96. package/dist/engine/branch/branch-space.respec.node.d.mts.map +1 -0
  97. package/dist/engine/branch/branch-space.respec.node.mjs +138 -0
  98. package/dist/engine/branch/branch-space.respec.node.mjs.map +1 -0
  99. package/dist/engine/branch/branch-types.d.mts +26 -0
  100. package/dist/engine/branch/branch-types.d.mts.map +1 -0
  101. package/dist/engine/branch/branch-types.mjs +7 -0
  102. package/dist/engine/branch/branch-types.mjs.map +1 -0
  103. package/dist/engine/diff/line-diff-helper.d.mts +76 -0
  104. package/dist/engine/diff/line-diff-helper.d.mts.map +1 -0
  105. package/dist/engine/diff/line-diff-helper.mjs +144 -0
  106. package/dist/engine/diff/line-diff-helper.mjs.map +1 -0
  107. package/dist/engine/diff/line-diff-helper.respec.node.d.mts +7 -0
  108. package/dist/engine/diff/line-diff-helper.respec.node.d.mts.map +1 -0
  109. package/dist/engine/diff/line-diff-helper.respec.node.mjs +66 -0
  110. package/dist/engine/diff/line-diff-helper.respec.node.mjs.map +1 -0
  111. package/dist/engine/filter/glob-helper.d.mts +51 -0
  112. package/dist/engine/filter/glob-helper.d.mts.map +1 -0
  113. package/dist/engine/filter/glob-helper.mjs +132 -0
  114. package/dist/engine/filter/glob-helper.mjs.map +1 -0
  115. package/dist/engine/filter/glob-helper.respec.node.d.mts +7 -0
  116. package/dist/engine/filter/glob-helper.respec.node.d.mts.map +1 -0
  117. package/dist/engine/filter/glob-helper.respec.node.mjs +78 -0
  118. package/dist/engine/filter/glob-helper.respec.node.mjs.map +1 -0
  119. package/dist/engine/index/index-helper.d.mts +78 -0
  120. package/dist/engine/index/index-helper.d.mts.map +1 -0
  121. package/dist/engine/index/index-helper.mjs +289 -0
  122. package/dist/engine/index/index-helper.mjs.map +1 -0
  123. package/dist/engine/index/index-types.d.mts +63 -0
  124. package/dist/engine/index/index-types.d.mts.map +1 -0
  125. package/dist/engine/index/index-types.mjs +7 -0
  126. package/dist/engine/index/index-types.mjs.map +1 -0
  127. package/dist/engine/item/item-atom-helper.d.mts +20 -0
  128. package/dist/engine/item/item-atom-helper.d.mts.map +1 -0
  129. package/dist/engine/item/item-atom-helper.mjs +30 -0
  130. package/dist/engine/item/item-atom-helper.mjs.map +1 -0
  131. package/dist/engine/item/item-helper.d.mts +37 -0
  132. package/dist/engine/item/item-helper.d.mts.map +1 -0
  133. package/dist/engine/item/item-helper.mjs +194 -0
  134. package/dist/engine/item/item-helper.mjs.map +1 -0
  135. package/dist/engine/item/item-types.d.mts +127 -0
  136. package/dist/engine/item/item-types.d.mts.map +1 -0
  137. package/dist/engine/item/item-types.mjs +16 -0
  138. package/dist/engine/item/item-types.mjs.map +1 -0
  139. package/dist/index.d.mts +7 -0
  140. package/dist/index.d.mts.map +1 -0
  141. package/dist/index.mjs +7 -0
  142. package/dist/index.mjs.map +1 -0
  143. package/dist/respec-gib.node.d.mts +7 -0
  144. package/dist/respec-gib.node.d.mts.map +1 -0
  145. package/dist/respec-gib.node.mjs +11 -0
  146. package/dist/respec-gib.node.mjs.map +1 -0
  147. package/dist/vcs-gib-constants.d.mts +7 -0
  148. package/dist/vcs-gib-constants.d.mts.map +1 -0
  149. package/dist/vcs-gib-constants.mjs +7 -0
  150. package/dist/vcs-gib-constants.mjs.map +1 -0
  151. package/dist/vcs-gib.respec.node.d.mts +8 -0
  152. package/dist/vcs-gib.respec.node.d.mts.map +1 -0
  153. package/dist/vcs-gib.respec.node.mjs +82 -0
  154. package/dist/vcs-gib.respec.node.mjs.map +1 -0
  155. package/generate-version-file.js +20 -0
  156. package/package.json +28 -0
  157. package/src/AUTO-GENERATED-version.mts +5 -0
  158. package/src/assumptions.respec.mts +50 -0
  159. package/src/bootstrap/node-bootstrap.mts +198 -0
  160. package/src/bootstrap/node-bootstrap.respec.node.mts +35 -0
  161. package/src/cli/cli-arg-parser.mts +119 -0
  162. package/src/cli/cli-arg-parser.respec.node.mts +45 -0
  163. package/src/cli/cli-constants.mts +77 -0
  164. package/src/cli/cli-e2e.respec.node.mts +318 -0
  165. package/src/cli/commands/add-cmd.mts +415 -0
  166. package/src/cli/commands/branch-checkout-cmd.respec.node.mts +322 -0
  167. package/src/cli/commands/branch-cmd.mts +243 -0
  168. package/src/cli/commands/checkout-cmd.mts +202 -0
  169. package/src/cli/commands/commit-cmd.mts +421 -0
  170. package/src/cli/commands/commit-log-cmd.respec.node.mts +276 -0
  171. package/src/cli/commands/init-cmd.mts +152 -0
  172. package/src/cli/commands/init-cmd.respec.node.mts +49 -0
  173. package/src/cli/commands/log-cmd.mts +197 -0
  174. package/src/cli/commands/status-add-cmd.respec.node.mts +246 -0
  175. package/src/cli/commands/status-cmd.mts +366 -0
  176. package/src/cli/vcs-cli-main.mts +153 -0
  177. package/src/engine/branch/branch-graph-helper.mts +69 -0
  178. package/src/engine/branch/branch-helper.mts +79 -0
  179. package/src/engine/branch/branch-space-helper.mts +104 -0
  180. package/src/engine/branch/branch-space.respec.node.mts +158 -0
  181. package/src/engine/branch/branch-types.mts +29 -0
  182. package/src/engine/diff/line-diff-helper.mts +210 -0
  183. package/src/engine/diff/line-diff-helper.respec.node.mts +84 -0
  184. package/src/engine/filter/glob-helper.mts +165 -0
  185. package/src/engine/filter/glob-helper.respec.node.mts +94 -0
  186. package/src/engine/index/index-helper.mts +378 -0
  187. package/src/engine/index/index-types.mts +66 -0
  188. package/src/engine/item/item-atom-helper.mts +30 -0
  189. package/src/engine/item/item-helper.mts +239 -0
  190. package/src/engine/item/item-types.mts +136 -0
  191. package/src/index.mts +7 -0
  192. package/src/respec-gib.node.mts +12 -0
  193. package/src/vcs-gib-constants.mts +7 -0
  194. package/src/vcs-gib.respec.node.mts +96 -0
  195. package/test_runs/001-hello-node/20260728_090100_0001-flow-core-main.md +39 -0
  196. package/test_runs/001-hello-node/20260728_090200_0003-flow-branching-worktree.md +54 -0
  197. package/test_runs/001-hello-node/20260728_090300_0002-flow-selective-add.md +45 -0
  198. package/test_runs/001-hello-node/20260728_142100_0007-flow-edge-cases.md +44 -0
  199. package/test_runs/001-hello-node/20260728_142400_0005-flow-hardcoded-ignores.md +36 -0
  200. package/tools/pack-for-test.mjs +73 -0
  201. package/tsconfig.json +18 -0
  202. package/tsconfig.tsbuildinfo +1 -0
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # @ibgib/vcs-gib
2
+
3
+ > **Decentralized Version Control System (`ibgib` VCS)**
4
+ > Built on content-addressed, cryptographic Merkle DAG hypergraphs (`ib^gib`).
5
+
6
+ `vcs-gib` provides a zero-dependency, 100% in-band decentralized version control system CLI engine for human developers and autonomous AI coding agents.
7
+
8
+ ---
9
+
10
+ ## 🏛️ Architecture Highlights
11
+
12
+ - **Multi-Space Branching (`b2s_<branchName>`)**: Every branch lives in its own dedicated local space inside `.vcsgib/ibgib/b2s_<branchName>/`, eliminating metastone timeline collisions (`tjp -> latest`) and enabling native space-to-space `SyncSaga` branch merging (`vcs merge`).
13
+ - **Upward `.vcsgib` Discovery**: Commands run seamlessly from any subfolder or worktree directory (`cd b/feature-ui` or `cd src/`), walking parent directories to find the repository root (`repoRoot`).
14
+ - **100% In-Band `ibgib` Graph Storage**: Repository index, active branch pointers, commit comments (`CommentIbGib_V1`), and binary payloads (`BinIbGib_V1`) are stored as immutable Merkle graph nodes.
15
+ - **Zero 3rd-Party Runtime Dependencies**: Pure TypeScript/ESM implementation using native Node.js APIs and `@ibgib` monorepo packages.
16
+
17
+ ---
18
+
19
+ ## 📚 Quickstart & Documentation
20
+
21
+ For the complete CLI user guide, command reference, worktree branching model, and step-by-step agent walkthroughs, see:
22
+
23
+ 👉 **[VCS CLI User & Agent Quickstart Guide](./VCS_CLI_USER_GUIDE.md)**
24
+
25
+ ---
26
+
27
+ ## ⚡ Global CLI Commands
28
+
29
+ The CLI binary commands are globally available as **`ibgib`** and **`vcs`**:
30
+
31
+ ```bash
32
+ # View command help
33
+ ibgib --help
34
+
35
+ # Initialize repository in current directory (creates b2s_main space in .vcsgib/ibgib/)
36
+ ibgib init .
37
+
38
+ # Check working tree status
39
+ ibgib status
40
+
41
+ # Stage untracked and modified files
42
+ ibgib add -a
43
+
44
+ # Commit snapshot with message
45
+ ibgib commit -m "My commit message"
46
+
47
+ # View commit timeline history
48
+ ibgib log
49
+
50
+ # List or create branches (populates b2s_<branchName> space via getDependencyGraph)
51
+ ibgib branch feature-ui
52
+
53
+ # Switch active branch and project worktree (b/feature-ui/)
54
+ ibgib checkout feature-ui
55
+ ```
56
+
57
+ ---
58
+
59
+ ## 🏗️ Monorepo Build, Test & Package Workflows
60
+
61
+ ### 🧪 Unit & Integration Testing
62
+ Run the single token-efficient respec test command from the monorepo root:
63
+
64
+ ```bash
65
+ npm run test:vcs-gib
66
+ ```
67
+
68
+ ---
69
+
70
+ ### 📦 Isolated Downstream Testing & Hermetic Packaging (`build:for:test`)
71
+
72
+ To eliminate global `npm link` pollution and prepare for hermetic, dockerized downstream CI testing, `vcs-gib` provides a automated packaging pipeline.
73
+
74
+ #### Purpose of Isolated Testing:
75
+ - Prevents `npm link` from contaminating global system state or interfering with monorepo dependencies.
76
+ - Bumps the patch version (`0.0.x`), compiles `vcs-gib`, generates an npm tarball (`.tgz`), and deploys it to an isolated downstream testing workspace (`test_repos/packages/`).
77
+
78
+ #### How to Execute:
79
+ From the monorepo root:
80
+
81
+ ```bash
82
+ # Run the test packaging pipeline (or 'npm run build:vcs-gib:test')
83
+ npm run build:for:test
84
+ ```
85
+
86
+ #### Environment Variable Configuration:
87
+ The target destination directory can be configured in your root `.env` file or environment:
88
+
89
+ ```env
90
+ VCS_GIB_TEST_PACKAGE_DIR="c:\Users\billm\antigravity\test_repos\packages"
91
+ ```
92
+
93
+ #### Downstream Execution Note:
94
+ > 💡 **Next Step**: After executing `npm run build:for:test`, navigate to your downstream `test_repos` workspace (`c:\Users\billm\antigravity\test_repos\`) and execute automated `respec-gib` integration test suites against `vcs-gib-latest.tgz` (or specific versioned tarball `vcs-gib-0.0.x.tgz`) as needed!
@@ -0,0 +1,198 @@
1
+ # 🚀 `ibgib` VCS CLI - User & Agent Quickstart Guide
2
+
3
+ Welcome to the **`ibgib` Version Control System (VCS)** CLI!
4
+
5
+ `ibgib` VCS is a next-generation decentralized version control system built on a content-addressed, cryptographic Merkle DAG hypergraph (`ib^gib`). Unlike traditional Git, **100% of repository state, branch pointers, commit graphs, and staged indices live in-band as immutable `ibgib` graph nodes**.
6
+
7
+ The global CLI executable command is **`ibgib`** (or its alias **`vcs`**).
8
+
9
+ ---
10
+
11
+ ## 🏛️ Key Architectural Features
12
+
13
+ 1. **Multi-Space Branching (`b2s_<branchName>`)**:
14
+ - Each branch lives in its own dedicated local space inside `.vcsgib/ibgib/b2s_<branchName>/`.
15
+ - **Zero Metastone Timeline Collisions**: Each branch tracks its own file timeline tips (`tjp -> latest`) cleanly.
16
+ - **Native Space-to-Space Merging**: Branch merging (`vcs merge`) uses `SyncSagaCoordinator` natively space-to-space out of the box.
17
+ 2. **Upward `.vcsgib` Discovery**:
18
+ - Running `ibgib` commands inside any subfolder or worktree directory (e.g. `cd b/feature-login` or `cd src/`) automatically walks parent directories (`path.dirname`) to find `.vcsgib` and locate the repository root (`repoRoot`).
19
+ 3. **1-to-1 Worktree Alignment**:
20
+ - Root folder `my-repo/` $\longleftrightarrow$ Space `b2s_main`.
21
+ - Subfolder `my-repo/b/<branch>/` $\longleftrightarrow$ Space `b2s_<branch>`.
22
+
23
+ ---
24
+
25
+ ## 📦 Testing & Package Build Workflow
26
+
27
+ The repository uses an isolated, hermetic downstream packaging workflow (`build:for:test`):
28
+
29
+ ```bash
30
+ # Build vcs-gib, bump patch version, pack tarball, and deploy to downstream test_repos/packages/
31
+ npm run build:for:test
32
+ ```
33
+
34
+ After executing `npm run build:for:test`, navigate to `c:\Users\billm\antigravity\test_repos\` and run automated integration test suites against `vcs-gib-latest.tgz`.
35
+
36
+ ---
37
+
38
+ ## 🛠️ Command Reference Summary
39
+
40
+ | Command | Syntax | Description | Example |
41
+ | :--- | :--- | :--- | :--- |
42
+ | **`init`** | `ibgib init [dir]` | Initializes a new `ibgib` repository in target directory. Scopes `.vcsgib/ibgib/b2s_main/` space, root folder node, `main` branch, and in-band index. | `ibgib init .`<br>`ibgib init my-repo` |
43
+ | **`status`** | `ibgib status` | Displays working tree status: untracked files, modified files, deleted files, and staged items on active branch space (`b2s_<activeBranch>`). Works from root or subfolders. | `ibgib status` |
44
+ | **`add`** | `ibgib add <path...>`<br>`ibgib add -a` | Stages file/folder candidate nodes and binary payloads into active branch space index (`B2tFSIndexIbGib_V1`). Use `-a` or `--all` to stage everything. | `ibgib add src/index.ts`<br>`ibgib add -a` |
45
+ | **`commit`** | `ibgib commit -m "msg"` | Records snapshot changes in active branch space, creates an in-band commit comment (`CommentIbGib_V1`), advances branch tip, and clears index staging. | `ibgib commit -m "Initial commit"` |
46
+ | **`log`** | `ibgib log` | Displays formatted commit history walking backward along active branch timeline (`past` / `ancestor` rel8ns). | `ibgib log` |
47
+ | **`branch`** | `ibgib branch [name]` | Omitted `name`: lists registered branches.<br>Provided `name`: creates dedicated branch space `b2s_<name>`, populates graph nodes via `getDependencyGraph`, and registers `B2tFSBranchIbGib_V1`. | `ibgib branch`<br>`ibgib branch feature-ui` |
48
+ | **`checkout`** | `ibgib checkout <branch>` | Switches active branch in index and materializes branch snapshot onto target worktree directory (`my-repo/` if main, `b/<branch>/` if secondary). | `ibgib checkout main`<br>`ibgib checkout feature-ui` |
49
+
50
+ ---
51
+
52
+ ## 📁 Repository Directory Structure & Worktree Model
53
+
54
+ When you run `ibgib init my-repo`, the directory layout operates as follows:
55
+
56
+ ```text
57
+ my-repo/
58
+ ├── .vcsgib/ <-- Hardcoded ignored metadata folder
59
+ │ ├── ibgib/ <-- LocalSpace graph storage for branch spaces
60
+ │ │ ├── 000_zerospace/ <-- Metaspace registry
61
+ │ │ ├── b2s_main/ <-- Space for 'main' branch
62
+ │ │ └── b2s_feature-ui/ <-- Space for 'feature-ui' branch
63
+ │ └── vcs_index_projection.json <-- Read-only index projection cache
64
+ ├── b/ <-- Reserved branch worktrees directory
65
+ │ ├── feature-ui/ <-- Projected worktree for branch 'feature-ui'
66
+ │ │ └── app.ts
67
+ │ └── feature-auth/ <-- Projected worktree for branch 'feature-auth'
68
+ │ └── auth.ts
69
+ ├── src/ <-- Source code files (tracked on 'main' branch)
70
+ │ └── main.ts
71
+ └── .ibgibignore <-- Optional user ignore filter file
72
+ ```
73
+
74
+ ### Key Worktree Rules:
75
+ 1. **Primary Workspace (`main`)**: The root folder `my-repo/` is the active physical workspace for `main`.
76
+ 2. **Secondary Branch Worktrees (`b/<branch>/`)**: When you create and check out a secondary branch (e.g. `feature-ui`), its projected workspace files live under `my-repo/b/feature-ui/`.
77
+ 3. **Upward Discovery**: You can run `ibgib status`, `ibgib add`, `ibgib commit` directly inside `b/feature-ui/` or `src/`. `ibgib` automatically discovers `.vcsgib` in the parent directory tree.
78
+ 4. **Hardcoded Reserved Ignored Paths**:
79
+ The following paths are **automatically ignored** during workspace scans regardless of `.ibgibignore`:
80
+ - `.vcsgib` (in-band metadata and localSpace graph storage)
81
+ - `b` (secondary branch worktree folder)
82
+ - `ibgib` (zerospace metadata cache)
83
+ - `node_modules`
84
+ - `.git`
85
+
86
+ ---
87
+
88
+ ## 🚫 `.ibgibignore` File Filter Semantics
89
+
90
+ You can place an optional `.ibgibignore` file in your repository root. Standard `.gitignore` rules apply:
91
+
92
+ ```gitignore
93
+ # Ignore log files and build outputs
94
+ *.log
95
+ dist/
96
+ temp/
97
+
98
+ # Negation rule (include specific file)
99
+ !important.log
100
+ ```
101
+
102
+ ---
103
+
104
+ ## 🤖 Step-by-Step Walkthrough for AI Agents & Humans
105
+
106
+ Here is a complete, copy-pasteable CLI session demonstrating how to use `ibgib`:
107
+
108
+ ### Step 1: Create and initialize repository
109
+ ```bash
110
+ # Create directory and initialize ibgib repository
111
+ mkdir my-app
112
+ cd my-app
113
+ ibgib init .
114
+ ```
115
+ *Output:* Initialized empty ibgib repository at `my-app` (spaceId: `b2s_main`, activeBranch: `main`).
116
+
117
+ ---
118
+
119
+ ### Step 2: Create files and check status
120
+ ```bash
121
+ # Create initial source files
122
+ echo 'console.log("Hello ibgib!");' > index.ts
123
+ echo 'export const version = "1.0.0";' > config.ts
124
+
125
+ # Check status
126
+ ibgib status
127
+ ```
128
+ *Output:* Shows `index.ts` and `config.ts` under **Untracked files**.
129
+
130
+ ---
131
+
132
+ ### Step 3: Stage and commit files
133
+ ```bash
134
+ # Stage all files
135
+ ibgib add -a
136
+
137
+ # Commit snapshot with message
138
+ ibgib commit -m "Add initial index.ts and config.ts"
139
+ ```
140
+ *Output:* Commits snapshot into `b2s_main` space, creates `CommentIbGib_V1` node, and advances `main` branch tip.
141
+
142
+ ---
143
+
144
+ ### Step 4: View commit history
145
+ ```bash
146
+ ibgib log
147
+ ```
148
+ *Output:* Displays commit hash, timestamp, comment message (`Add initial index.ts and config.ts`), and author.
149
+
150
+ ---
151
+
152
+ ### Step 5: Create a new branch and checkout
153
+ ```bash
154
+ # Create new feature branch (populates b2s_feature-login space via getDependencyGraph)
155
+ ibgib branch feature-login
156
+
157
+ # Switch to feature branch
158
+ ibgib checkout feature-login
159
+ ```
160
+ *Output:* Switches active branch to `feature-login` and projects branch files into `b/feature-login/`.
161
+
162
+ ---
163
+
164
+ ### Step 6: Make changes in feature branch worktree
165
+ ```bash
166
+ # Navigate into feature branch worktree
167
+ cd b/feature-login
168
+
169
+ # Add feature login file
170
+ echo 'export function login() { return true; }' > login.ts
171
+
172
+ # Check status (Upward discovery finds .vcsgib and targets b2s_feature-login space!)
173
+ ibgib status
174
+
175
+ # Stage and commit in feature branch
176
+ ibgib add -a
177
+ ibgib commit -m "Implement login helper"
178
+ ```
179
+
180
+ ---
181
+
182
+ ### Step 7: Switch back to main branch
183
+ ```bash
184
+ # Return to repository root
185
+ cd ../..
186
+
187
+ # Switch back to main branch
188
+ ibgib checkout main
189
+ ```
190
+ *Output:* Active branch set back to `main`. `my-repo/` working tree reflects `main` snapshot.
191
+
192
+ ---
193
+
194
+ ## 💡 Key Design Guarantees for AI Agents
195
+
196
+ 1. **Deterministic Execution**: Every CLI command completes synchronously and outputs clear, structured status messages.
197
+ 2. **Zero 3rd-Party Runtime Dependencies**: All commands run natively on Node.js using internal `@ibgib/*` packages.
198
+ 3. **In-Band Merkle Links**: All commit nodes, items, and binary file payloads are cryptographically hashed as composite `ib^gib` addresses (`v1^ib^gib`).
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @module AUTO-GENERATED-version
3
+ * Auto-generated version constant. Do NOT edit directly.
4
+ */
5
+ export declare const AUTO_GENERATED_VERSION = "0.0.6";
6
+ //# sourceMappingURL=AUTO-GENERATED-version.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AUTO-GENERATED-version.d.mts","sourceRoot":"","sources":["../src/AUTO-GENERATED-version.mts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,UAAU,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @module AUTO-GENERATED-version
3
+ * Auto-generated version constant. Do NOT edit directly.
4
+ */
5
+ export const AUTO_GENERATED_VERSION = '0.0.6';
6
+ //# sourceMappingURL=AUTO-GENERATED-version.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AUTO-GENERATED-version.mjs","sourceRoot":"","sources":["../src/AUTO-GENERATED-version.mts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=assumptions.respec.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assumptions.respec.d.mts","sourceRoot":"","sources":["../src/assumptions.respec.mts"],"names":[],"mappings":""}
@@ -0,0 +1,41 @@
1
+ import { ifWe, iReckon, respecfully } from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
2
+ const maam = `[${import.meta.url}]`, sir = maam;
3
+ /**
4
+ * wrapper that uses crypto.subtle under the hood (i.e. doesn't hash using ts-gib)
5
+ *
6
+ * notes:
7
+ *
8
+ * * i did in fact copy this from ts-gib though, but we're testing simply that the
9
+ * context (node/browser/whatever) has this since it's integral to all things ibgib.
10
+ */
11
+ async function cryptoSubtleHash({ s, algorithm = 'SHA-256', }) {
12
+ let { subtle } = globalThis.crypto;
13
+ if (!s) {
14
+ throw new Error(`[${cryptoSubtleHash.name}] s is required`);
15
+ }
16
+ if (!algorithm) {
17
+ throw new Error(`[${cryptoSubtleHash.name}] algorithm is required`);
18
+ }
19
+ try {
20
+ const msgUint8 = new TextEncoder().encode(s);
21
+ const buffer = await subtle.digest(algorithm, msgUint8);
22
+ const asArray = Array.from(new Uint8Array(buffer));
23
+ return asArray.map(b => b.toString(16).padStart(2, '0')).join('');
24
+ }
25
+ catch (e) {
26
+ console.error(e.message ?? e);
27
+ throw e;
28
+ }
29
+ }
30
+ await respecfully(sir, `non-ts-gib isomorphic crypto hashing`, async () => {
31
+ await ifWe(sir, `should digest simple string consistently using crypto.subtle directly `, async () => {
32
+ let h = await cryptoSubtleHash({ s: '42' });
33
+ iReckon(sir, h).asTo('42').isGonnaBe('73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049');
34
+ });
35
+ await ifWe(sir, `should digest simple stringified ibgib consistently using crypto.subtle directly `, async () => {
36
+ let ibgib = { ib: 'ib', gib: 'gib' };
37
+ let h = await cryptoSubtleHash({ s: JSON.stringify(ibgib) }); // doesn't use ts-gib but consistent stringifying json is important
38
+ iReckon(sir, h).asTo('ib^gib').isGonnaBe('cbad0694a257358c044611ea1fa88ace71a01a9b8409d2354d0387d8043f7671');
39
+ });
40
+ });
41
+ //# sourceMappingURL=assumptions.respec.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assumptions.respec.mjs","sourceRoot":"","sources":["../src/assumptions.respec.mts"],"names":[],"mappings":"AAAA,O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AK,IAAI,EAAE;IAEtE,MAAM,IAAI,CAAC,GAAG,EAAE,wEAAwE,EAAE,KAAK,IAAI,EAAE;QACjG,IAAI,CAAC,GAAG,MAAM,gBAAgB,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,kEAAkE,CAAC,CAAC;IAC7G,CAAC,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,GAAG,EAAE,mFAAmF,EAAE,KAAK,IAAI,EAAE;QAC5G,IAAI,KAAK,GAAa,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;QAC/C,IAAI,CAAC,GAAG,MAAM,gBAAgB,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,mEAAmE;QACjI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,kEAAkE,CAAC,CAAC;IACjH,CAAC,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @module node-bootstrap
3
+ *
4
+ * Rapid Node Metaspace bootstrap helper aligned with space-gib startup principles.
5
+ * Moves execution from CLI start to "ibgib environment" rapidly without process.chdir() hacks.
6
+ */
7
+ import { IbGibSpaceAny } from '@ibgib/core-gib/dist/witness/space/space-base-v1.mjs';
8
+ import { Metaspace_Nodespace } from '@ibgib/node-gib/dist/witness/space/metaspace/metaspace-nodespace/metaspace-nodespace.mjs';
9
+ export interface BootstrapVcsMetaspaceOpts {
10
+ /**
11
+ * Absolute or relative path to target repository directory. Defaults to process.cwd()
12
+ */
13
+ repoPath?: string;
14
+ /**
15
+ * Subfolder for vcs-gib metadata storage. Defaults to '.vcsgib'
16
+ */
17
+ vcsFolderName?: string;
18
+ /**
19
+ * Default space name for non-interactive headless testing. Defaults to 'vcs_space'
20
+ */
21
+ defaultSpaceName?: string;
22
+ }
23
+ export interface BootstrapVcsMetaspaceResult {
24
+ metaspace: Metaspace_Nodespace;
25
+ localSpace: IbGibSpaceAny;
26
+ vcsPath: string;
27
+ repoRoot: string;
28
+ }
29
+ /**
30
+ * Bootstraps Metaspace_Nodespace and initializes the local repository space.
31
+ * Moves execution into the ibgib environment rapidly without process.chdir() directory hacks.
32
+ * Performs upward discovery of .vcsgib metadata folder.
33
+ */
34
+ export declare function bootstrapVcsMetaspace(opts?: BootstrapVcsMetaspaceOpts): Promise<BootstrapVcsMetaspaceResult>;
35
+ //# sourceMappingURL=node-bootstrap.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-bootstrap.d.mts","sourceRoot":"","sources":["../../src/bootstrap/node-bootstrap.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AAErF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0FAA0F,CAAC;AAU/H,MAAM,WAAW,yBAAyB;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,2BAA2B;IACxC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,UAAU,EAAE,aAAa,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACvC,IAAI,GAAE,yBAA8B,GACrC,OAAO,CAAC,2BAA2B,CAAC,CAgJtC"}
@@ -0,0 +1,165 @@
1
+ /**
2
+ * @module node-bootstrap
3
+ *
4
+ * Rapid Node Metaspace bootstrap helper aligned with space-gib startup principles.
5
+ * Moves execution from CLI start to "ibgib environment" rapidly without process.chdir() hacks.
6
+ */
7
+ import path from 'node:path';
8
+ import fs from 'node:fs/promises';
9
+ import { clone, delay } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
10
+ import { getGib } from '@ibgib/ts-gib/dist/V1/transforms/transform-helper.mjs';
11
+ import { updateBootstrapIbGib } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
12
+ import { Metaspace_Nodespace } from '@ibgib/node-gib/dist/witness/space/metaspace/metaspace-nodespace/metaspace-nodespace.mjs';
13
+ import { NodeFilesystemSpace_V1 } from '@ibgib/node-gib/dist/witness/space/node-filesystem-space/node-filesystem-space-v1.mjs';
14
+ import { DEFAULT_NODE_FILESYSTEM_SPACE_DATA_V1 } from '@ibgib/node-gib/dist/witness/space/node-filesystem-space/node-filesystem-space-types.mjs';
15
+ import { fnCreateNewLocalSpace, fnDtoToSpace_nodeFilesystem } from '@ibgib/node-gib/dist/witness/space/metaspace/metaspace-nodespace/metaspace-nodespace-helper.mjs';
16
+ import { GLOBAL_LOG_A_LOT } from '../vcs-gib-constants.mjs';
17
+ const lcFile = `[node-bootstrap]`;
18
+ const logalot = GLOBAL_LOG_A_LOT;
19
+ /**
20
+ * Bootstraps Metaspace_Nodespace and initializes the local repository space.
21
+ * Moves execution into the ibgib environment rapidly without process.chdir() directory hacks.
22
+ * Performs upward discovery of .vcsgib metadata folder.
23
+ */
24
+ export async function bootstrapVcsMetaspace(opts = {}) {
25
+ const lc = `${lcFile}[${bootstrapVcsMetaspace.name}]`;
26
+ try {
27
+ if (logalot) {
28
+ console.log(`${lc} starting... (I: 9f8a0b1c2d3e4f5a6b7c8d9e0f1a2b3c)`);
29
+ }
30
+ const { repoPath = process.cwd(), vcsFolderName = '.vcsgib', } = opts;
31
+ let currentDir = path.resolve(repoPath);
32
+ let foundVcsPath;
33
+ let repoRoot = currentDir;
34
+ while (true) {
35
+ const candidateVcsPath = path.join(currentDir, vcsFolderName);
36
+ let exists = false;
37
+ try {
38
+ const stat = await fs.stat(candidateVcsPath);
39
+ if (stat.isDirectory()) {
40
+ exists = true;
41
+ }
42
+ }
43
+ catch {
44
+ exists = false;
45
+ }
46
+ if (exists) {
47
+ foundVcsPath = candidateVcsPath;
48
+ repoRoot = currentDir;
49
+ break;
50
+ }
51
+ const parentDir = path.dirname(currentDir);
52
+ if (parentDir === currentDir) {
53
+ break;
54
+ }
55
+ currentDir = parentDir;
56
+ }
57
+ const vcsPath = foundVcsPath || path.resolve(repoPath, vcsFolderName);
58
+ if (!foundVcsPath) {
59
+ repoRoot = path.resolve(repoPath);
60
+ }
61
+ const safeRepoDir = path.basename(repoRoot).replace(/[^a-zA-Z0-9_\-]/g, '_');
62
+ const defaultSpaceName = opts.defaultSpaceName || `vcs_${safeRepoDir}`;
63
+ if (logalot) {
64
+ console.log(`${lc} initializing vcsMetaspace at vcsPath: ${vcsPath}, repoRoot: ${repoRoot} (I: 4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d)`);
65
+ }
66
+ // Read localSpaceId from index projection if repository has been initialized
67
+ let localSpaceId;
68
+ try {
69
+ const projFile = path.join(vcsPath, 'vcs_index_projection.json');
70
+ const projRaw = await fs.readFile(projFile, 'utf8');
71
+ const projData = JSON.parse(projRaw);
72
+ if (projData && projData.spaceId) {
73
+ localSpaceId = projData.spaceId;
74
+ }
75
+ }
76
+ catch {
77
+ // Projection file missing before init
78
+ }
79
+ // Instantiate Metaspace_Nodespace
80
+ const metaspace = new Metaspace_Nodespace(undefined);
81
+ metaspace.fnUpdateBootstrap = async (newSpace) => {
82
+ await updateBootstrapIbGib({ zeroSpace: metaspace.zeroSpace, space: newSpace });
83
+ };
84
+ await metaspace.initialize({
85
+ spaceName: defaultSpaceName,
86
+ metaspaceFactory: {
87
+ fnZeroSpaceFactory: () => {
88
+ const zeroSpaceData = {
89
+ ...clone(DEFAULT_NODE_FILESYSTEM_SPACE_DATA_V1),
90
+ baseDir: vcsPath,
91
+ };
92
+ const zeroSpace = new NodeFilesystemSpace_V1(zeroSpaceData);
93
+ zeroSpace.gib = 'gib';
94
+ return zeroSpace;
95
+ },
96
+ fnDefaultLocalSpaceFactory: async (spaceOpts) => {
97
+ const space = await fnCreateNewLocalSpace(spaceOpts);
98
+ if (space && space.data) {
99
+ space.data.baseDir = vcsPath;
100
+ space.gib = await getGib({ ibGib: space, hasTjp: true });
101
+ }
102
+ return space;
103
+ },
104
+ fnDtoToSpace: async (spaceDto) => {
105
+ const space = await fnDtoToSpace_nodeFilesystem(spaceDto);
106
+ if (space && space.data) {
107
+ space.data.baseDir = vcsPath;
108
+ }
109
+ return space;
110
+ },
111
+ },
112
+ getFnAlert: () => async ({ title, msg }) => {
113
+ if (logalot) {
114
+ console.log(`${lc} [Alert] ${title}: ${msg} (I: 7e6f5d4c3b2a1f0e9d8c7b6a5f4e3d2c)`);
115
+ }
116
+ },
117
+ getFnPrompt: () => async ({ title, msg }) => {
118
+ if (logalot) {
119
+ console.log(`${lc} [Prompt] ${title}: ${msg} (I: 2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e)`);
120
+ }
121
+ return defaultSpaceName;
122
+ },
123
+ getFnPromptPassword: () => async (title, msg) => {
124
+ if (logalot) {
125
+ console.log(`${lc} [PromptPwd] ${title}: ${msg} (I: 5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c)`);
126
+ }
127
+ return null;
128
+ },
129
+ });
130
+ while (!metaspace.initialized) {
131
+ await delay(10);
132
+ }
133
+ const localSpace = await metaspace.getLocalUserSpace({
134
+ localSpaceId,
135
+ lock: false,
136
+ });
137
+ if (!localSpace) {
138
+ throw new Error(`Failed to initialize localUserSpace in metaspace (E: 8192a472c9104b2c)`);
139
+ }
140
+ if (localSpace.data && localSpace.data.baseDir !== vcsPath) {
141
+ localSpace.data.baseDir = vcsPath;
142
+ }
143
+ await localSpace.initialized;
144
+ if (logalot) {
145
+ const spaceName = localSpace.data?.name || localSpace.ib;
146
+ console.log(`${lc} Metaspace ready. LocalSpace name/ib: ${spaceName} (I: 1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f)`);
147
+ }
148
+ return {
149
+ metaspace,
150
+ localSpace,
151
+ vcsPath,
152
+ repoRoot,
153
+ };
154
+ }
155
+ catch (error) {
156
+ console.error(`${lc} ${error?.message || error} (E: 8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d)`);
157
+ throw error;
158
+ }
159
+ finally {
160
+ if (logalot) {
161
+ console.log(`${lc} complete. (I: 3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a)`);
162
+ }
163
+ }
164
+ }
165
+ //# sourceMappingURL=node-bootstrap.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-bootstrap.mjs","sourceRoot":"","sources":["../../src/bootstrap/node-bootstrap.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAElC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,uDAAuD,CAAC;AAE/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,0FAA0F,CAAC;AAC/H,OAAO,EAAE,sBAAsB,EAAE,MAAM,uFAAuF,CAAC;AAC/H,OAAO,EAAE,qCAAqC,EAAE,MAAM,0FAA0F,CAAC;AACjJ,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,iGAAiG,CAAC;AAErK,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,MAAM,GAAG,kBAAkB,CAAC;AAClC,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAwBjC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACvC,IAAI,GAA8B,EAAE;IAEpC,MAAM,EAAE,GAAG,GAAG,MAA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AC;IACN,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,KAAK,EAAE,OAAO,IAAI,KAAK,wCAAwC,CAAC,CAAC;QACxF,MAAM,KAAK,CAAC;IAChB,CAAC;YAAS,CAAC;QACP,IAAI,OAAO,EAAE,CAAC;YAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,kDAAkD,CAAC,CAAC;QAAC,CAAC;IAC1F,CAAC;AACL,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module node-bootstrap.respec
3
+ *
4
+ * Unit tests for rapid Node Metaspace bootstrap helper.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=node-bootstrap.respec.node.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-bootstrap.respec.node.d.mts","sourceRoot":"","sources":["../../src/bootstrap/node-bootstrap.respec.node.mts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @module node-bootstrap.respec
3
+ *
4
+ * Unit tests for rapid Node Metaspace bootstrap helper.
5
+ */
6
+ import path from 'node:path';
7
+ import fs from 'node:fs/promises';
8
+ import { respecfully, ifWe, iReckon } from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
9
+ import { bootstrapVcsMetaspace } from './node-bootstrap.mjs';
10
+ const lc = `[apps/vcs-gib/src/bootstrap/node-bootstrap.respec.node.mts]`;
11
+ await respecfully(lc, `Node Metaspace Bootstrap`, async () => {
12
+ await ifWe(lc, `bootstraps metaspace and local space rapidly without errors`, async () => {
13
+ const testDir = path.join(process.cwd(), '.test_bootstrap_repo');
14
+ try {
15
+ const { metaspace, localSpace, vcsPath } = await bootstrapVcsMetaspace({
16
+ repoPath: testDir,
17
+ vcsFolderName: '.vcsgib_test',
18
+ });
19
+ iReckon(lc, metaspace.initialized).isGonnaBeTrue();
20
+ iReckon(lc, localSpace).isGonnaBeTruthy();
21
+ iReckon(lc, vcsPath).includes('.vcsgib_test');
22
+ }
23
+ finally {
24
+ await fs.rm(testDir, { recursive: true, force: true });
25
+ }
26
+ });
27
+ });
28
+ //# sourceMappingURL=node-bootstrap.respec.node.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-bootstrap.respec.node.mjs","sourceRoot":"","sources":["../../src/bootstrap/node-bootstrap.respec.node.mts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAElC,OAAO,EACH,WAAW,EAAE,IAAI,EAAE,OAAO,EAC7B,MAAM,kDAAkD,CAAC;AAE1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,EAAE,GAAG,6DAA6D,CAAC;AAEzE,MAAM,WAAW,CAAC,EAAE,EAAE,0BAA0B,EAAE,KAAK,IAAI,EAAE;IAEzD,MAAM,IAAI,CAAC,EAAE,EAAE,6DAA6D,EAAE,KAAK,IAAI,EAAE;QACrF,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,sBAAsB,CAAC,CAAC;QACjE,IAAI,CAAC;YACD,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,MAAM,qBAAqB,CAAC;gBACnE,QAAQ,EAAE,OAAO;gBACjB,aAAa,EAAE,cAAc;aAChC,CAAC,CAAC;YAEH,OAAO,CAAC,EAAE,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,aAAa,EAAE,CAAC;YACnD,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC,eAAe,EAAE,CAAC;YAC1C,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAClD,CAAC;gBAAS,CAAC;YACP,MAAM,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @module cli-arg-parser
3
+ *
4
+ * Native, zero-dependency command line argument parser for vcs CLI commands.
5
+ * Refactored to use RCLIParamInfo constants and VCS_SUBCOMMANDS definitions.
6
+ */
7
+ import { VCS_SUBCOMMANDS } from './cli-constants.mjs';
8
+ export type VcsSubcommand = typeof VCS_SUBCOMMANDS[keyof typeof VCS_SUBCOMMANDS];
9
+ export interface ParsedVcsArgs {
10
+ command: VcsSubcommand;
11
+ positionals: string[];
12
+ flags: {
13
+ message?: string;
14
+ branchName?: string;
15
+ all?: boolean;
16
+ force?: boolean;
17
+ verbose?: boolean;
18
+ help?: boolean;
19
+ shareIgnored?: boolean;
20
+ };
21
+ rawArgs: string[];
22
+ }
23
+ /**
24
+ * Parses raw command line argument vector (process.argv.slice(2)).
25
+ */
26
+ export declare function parseVcsArgs(argv: string[]): ParsedVcsArgs;
27
+ //# sourceMappingURL=cli-arg-parser.d.mts.map