@ibgib/vcs-gib 0.0.30 → 0.0.32

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 (151) hide show
  1. package/dist/AUTO-GENERATED-version.d.mts +1 -1
  2. package/dist/AUTO-GENERATED-version.mjs +1 -1
  3. package/dist/bootstrap/node-bootstrap.mjs +1 -1
  4. package/dist/bootstrap/node-bootstrap.mjs.map +1 -1
  5. package/dist/cli/commands/add-cmd.d.mts +2 -3
  6. package/dist/cli/commands/add-cmd.d.mts.map +1 -1
  7. package/dist/cli/commands/add-cmd.mjs +30 -283
  8. package/dist/cli/commands/add-cmd.mjs.map +1 -1
  9. package/dist/cli/commands/branch-cmd.d.mts +8 -8
  10. package/dist/cli/commands/branch-cmd.d.mts.map +1 -1
  11. package/dist/cli/commands/branch-cmd.mjs +45 -176
  12. package/dist/cli/commands/branch-cmd.mjs.map +1 -1
  13. package/dist/cli/commands/checkout-cmd.d.mts +2 -4
  14. package/dist/cli/commands/checkout-cmd.d.mts.map +1 -1
  15. package/dist/cli/commands/checkout-cmd.mjs +31 -110
  16. package/dist/cli/commands/checkout-cmd.mjs.map +1 -1
  17. package/dist/cli/commands/commit-cmd.d.mts +7 -8
  18. package/dist/cli/commands/commit-cmd.d.mts.map +1 -1
  19. package/dist/cli/commands/commit-cmd.mjs +40 -390
  20. package/dist/cli/commands/commit-cmd.mjs.map +1 -1
  21. package/dist/cli/commands/generate-comment-cmd.d.mts.map +1 -1
  22. package/dist/cli/commands/generate-comment-cmd.mjs +5 -2
  23. package/dist/cli/commands/generate-comment-cmd.mjs.map +1 -1
  24. package/dist/cli/commands/init-cmd.d.mts +2 -2
  25. package/dist/cli/commands/init-cmd.d.mts.map +1 -1
  26. package/dist/cli/commands/init-cmd.mjs +20 -70
  27. package/dist/cli/commands/init-cmd.mjs.map +1 -1
  28. package/dist/cli/commands/log-cmd.d.mts +2 -3
  29. package/dist/cli/commands/log-cmd.d.mts.map +1 -1
  30. package/dist/cli/commands/log-cmd.mjs +42 -271
  31. package/dist/cli/commands/log-cmd.mjs.map +1 -1
  32. package/dist/cli/commands/merge-cmd.d.mts +3 -17
  33. package/dist/cli/commands/merge-cmd.d.mts.map +1 -1
  34. package/dist/cli/commands/merge-cmd.mjs +32 -218
  35. package/dist/cli/commands/merge-cmd.mjs.map +1 -1
  36. package/dist/cli/commands/reset-cmd.d.mts +1 -1
  37. package/dist/cli/commands/reset-cmd.d.mts.map +1 -1
  38. package/dist/cli/commands/reset-cmd.mjs +17 -19
  39. package/dist/cli/commands/reset-cmd.mjs.map +1 -1
  40. package/dist/cli/commands/restore-cmd.d.mts +8 -7
  41. package/dist/cli/commands/restore-cmd.d.mts.map +1 -1
  42. package/dist/cli/commands/restore-cmd.mjs +44 -62
  43. package/dist/cli/commands/restore-cmd.mjs.map +1 -1
  44. package/dist/cli/commands/status-cmd.d.mts +2 -2
  45. package/dist/cli/commands/status-cmd.d.mts.map +1 -1
  46. package/dist/cli/commands/status-cmd.mjs +63 -62
  47. package/dist/cli/commands/status-cmd.mjs.map +1 -1
  48. package/dist/cli/vcs-projection-helper.d.mts +23 -0
  49. package/dist/cli/vcs-projection-helper.d.mts.map +1 -0
  50. package/dist/cli/vcs-projection-helper.mjs +91 -0
  51. package/dist/cli/vcs-projection-helper.mjs.map +1 -0
  52. package/dist/test/test-helpers.d.mts +2 -2
  53. package/dist/test/test-helpers.d.mts.map +1 -1
  54. package/package.json +3 -3
  55. package/src/AUTO-GENERATED-version.mts +1 -1
  56. package/src/bootstrap/node-bootstrap.mts +1 -1
  57. package/src/cli/cli-e2e.respec.mts +4 -4
  58. package/src/cli/commands/add-cmd.mts +32 -347
  59. package/src/cli/commands/branch-cmd.mts +56 -225
  60. package/src/cli/commands/checkout-cmd.mts +34 -138
  61. package/src/cli/commands/commit-cmd.mts +46 -473
  62. package/src/cli/commands/commit-log-cmd.respec.mts +11 -7
  63. package/src/cli/commands/generate-comment-cmd.mts +6 -2
  64. package/src/cli/commands/init-cmd.mts +20 -73
  65. package/src/cli/commands/log-cmd.mts +41 -331
  66. package/src/cli/commands/merge-cmd.mts +32 -252
  67. package/src/cli/commands/reset-cmd.mts +17 -19
  68. package/src/cli/commands/restore-cmd.mts +52 -72
  69. package/src/cli/commands/status-add-cmd.respec.mts +3 -3
  70. package/src/cli/commands/status-cmd.mts +68 -63
  71. package/src/cli/vcs-projection-helper.mts +112 -0
  72. package/src/engine/branch/branch-space.respec.mts +5 -5
  73. package/src/engine/merge/b2tfs-sync-comments.respec.mts +4 -4
  74. package/src/test/test-helpers.mts +2 -2
  75. package/src/vcs-gib.respec.mts +11 -8
  76. package/tsconfig.test.tsbuildinfo +1 -1
  77. package/tsconfig.tsbuildinfo +1 -1
  78. package/dist/engine/branch/branch-graph-helper.d.mts +0 -28
  79. package/dist/engine/branch/branch-graph-helper.d.mts.map +0 -1
  80. package/dist/engine/branch/branch-graph-helper.mjs +0 -81
  81. package/dist/engine/branch/branch-graph-helper.mjs.map +0 -1
  82. package/dist/engine/branch/branch-helper.d.mts +0 -40
  83. package/dist/engine/branch/branch-helper.d.mts.map +0 -1
  84. package/dist/engine/branch/branch-helper.mjs +0 -78
  85. package/dist/engine/branch/branch-helper.mjs.map +0 -1
  86. package/dist/engine/branch/branch-space-helper.d.mts +0 -23
  87. package/dist/engine/branch/branch-space-helper.d.mts.map +0 -1
  88. package/dist/engine/branch/branch-space-helper.mjs +0 -78
  89. package/dist/engine/branch/branch-space-helper.mjs.map +0 -1
  90. package/dist/engine/branch/branch-types.d.mts +0 -26
  91. package/dist/engine/branch/branch-types.d.mts.map +0 -1
  92. package/dist/engine/branch/branch-types.mjs +0 -7
  93. package/dist/engine/branch/branch-types.mjs.map +0 -1
  94. package/dist/engine/diff/line-diff-helper.d.mts +0 -76
  95. package/dist/engine/diff/line-diff-helper.d.mts.map +0 -1
  96. package/dist/engine/diff/line-diff-helper.mjs +0 -144
  97. package/dist/engine/diff/line-diff-helper.mjs.map +0 -1
  98. package/dist/engine/filter/glob-helper.d.mts +0 -51
  99. package/dist/engine/filter/glob-helper.d.mts.map +0 -1
  100. package/dist/engine/filter/glob-helper.mjs +0 -132
  101. package/dist/engine/filter/glob-helper.mjs.map +0 -1
  102. package/dist/engine/index/index-helper.d.mts +0 -113
  103. package/dist/engine/index/index-helper.d.mts.map +0 -1
  104. package/dist/engine/index/index-helper.mjs +0 -533
  105. package/dist/engine/index/index-helper.mjs.map +0 -1
  106. package/dist/engine/index/index-types.d.mts +0 -63
  107. package/dist/engine/index/index-types.d.mts.map +0 -1
  108. package/dist/engine/index/index-types.mjs +0 -7
  109. package/dist/engine/index/index-types.mjs.map +0 -1
  110. package/dist/engine/item/item-atom-helper.d.mts +0 -20
  111. package/dist/engine/item/item-atom-helper.d.mts.map +0 -1
  112. package/dist/engine/item/item-atom-helper.mjs +0 -30
  113. package/dist/engine/item/item-atom-helper.mjs.map +0 -1
  114. package/dist/engine/item/item-helper.d.mts +0 -94
  115. package/dist/engine/item/item-helper.d.mts.map +0 -1
  116. package/dist/engine/item/item-helper.mjs +0 -424
  117. package/dist/engine/item/item-helper.mjs.map +0 -1
  118. package/dist/engine/item/item-types.d.mts +0 -128
  119. package/dist/engine/item/item-types.d.mts.map +0 -1
  120. package/dist/engine/item/item-types.mjs +0 -16
  121. package/dist/engine/item/item-types.mjs.map +0 -1
  122. package/dist/engine/merge/b2tfs-3way-graft-strategy.d.mts +0 -74
  123. package/dist/engine/merge/b2tfs-3way-graft-strategy.d.mts.map +0 -1
  124. package/dist/engine/merge/b2tfs-3way-graft-strategy.mjs +0 -570
  125. package/dist/engine/merge/b2tfs-3way-graft-strategy.mjs.map +0 -1
  126. package/dist/engine/merge/b2tfs-3way-graft-types.d.mts +0 -34
  127. package/dist/engine/merge/b2tfs-3way-graft-types.d.mts.map +0 -1
  128. package/dist/engine/merge/b2tfs-3way-graft-types.mjs +0 -2
  129. package/dist/engine/merge/b2tfs-3way-graft-types.mjs.map +0 -1
  130. package/dist/engine/status/status-helper.d.mts +0 -90
  131. package/dist/engine/status/status-helper.d.mts.map +0 -1
  132. package/dist/engine/status/status-helper.mjs +0 -286
  133. package/dist/engine/status/status-helper.mjs.map +0 -1
  134. package/src/engine/branch/branch-graph-helper.mts +0 -117
  135. package/src/engine/branch/branch-helper.mts +0 -112
  136. package/src/engine/branch/branch-space-helper.mts +0 -110
  137. package/src/engine/branch/branch-types.mts +0 -29
  138. package/src/engine/diff/line-diff-helper.mts +0 -210
  139. package/src/engine/diff/line-diff-helper.respec.mts +0 -84
  140. package/src/engine/filter/glob-helper.mts +0 -165
  141. package/src/engine/filter/glob-helper.respec.mts +0 -94
  142. package/src/engine/index/index-helper.mts +0 -705
  143. package/src/engine/index/index-types.mts +0 -66
  144. package/src/engine/item/item-atom-helper.mts +0 -30
  145. package/src/engine/item/item-helper.mts +0 -544
  146. package/src/engine/item/item-types.mts +0 -137
  147. package/src/engine/item/item.respec.mts +0 -92
  148. package/src/engine/merge/b2tfs-3way-graft-strategy.mts +0 -630
  149. package/src/engine/merge/b2tfs-3way-graft-strategy.respec.mts +0 -346
  150. package/src/engine/merge/b2tfs-3way-graft-types.mts +0 -34
  151. package/src/engine/status/status-helper.mts +0 -383
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @module status-cmd
3
3
  *
4
- * Command handler for `vcs status`.
4
+ * CLI command handler for `vcs status`.
5
5
  * Compares physical workspace state against active branch snapshot tip and in-band index staging area.
6
6
  */
7
7
 
@@ -9,9 +9,15 @@ import path from 'node:path';
9
9
  import fs from 'node:fs/promises';
10
10
 
11
11
  import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
12
+ import { executeVcsStatus } from '@ibgib/core-gib/dist/vcs/commands/status-cmd.mjs';
13
+ import { VcsStatusItem, PendingCommentInfo } from '@ibgib/core-gib/dist/vcs/status/status-helper.mjs';
14
+ import { resolveContextualBranchName } from '@ibgib/core-gib/dist/vcs/branch/branch-helper.mjs';
15
+
12
16
  import { bootstrapVcsMetaspace } from '../../bootstrap/node-bootstrap.mjs';
17
+ import { getOrCreateBranchSpace } from '@ibgib/node-gib/dist/vcs/branch-space-helper.mjs';
18
+ import { getOrCreateWorkspaceProjectionSpace } from '@ibgib/node-gib/dist/vcs/workspace-space-helper.mjs';
19
+ import { readVcsIndexProjectionFromDisk } from '../vcs-projection-helper.mjs';
13
20
  import { GLOBAL_LOG_A_LOT } from '../../vcs-gib-constants.mjs';
14
- import { getRepoStatus, VcsStatusItem, PendingCommentInfo } from '../../engine/status/status-helper.mjs';
15
21
 
16
22
  const lcFile = `[status-cmd]`;
17
23
  const logalot = GLOBAL_LOG_A_LOT;
@@ -61,16 +67,35 @@ export async function executeStatusCmd({
61
67
  throw new Error(`Not an ibgib repository (directory ${vcsPath} does not exist) (E: 4d5e6f7a8b9c10d11e12f13a14b15c6d)`);
62
68
  }
63
69
 
64
- const statusRes = await getRepoStatus({
70
+ const indexIbGib = await readVcsIndexProjectionFromDisk({ vcsPath, space: localSpace });
71
+ const branchName = resolveContextualBranchName({ targetDir: absTargetDir, repoRoot, indexIbGib });
72
+ const activeWorktreeDir = branchName === 'main' ? repoRoot : path.join(repoRoot, 'b', branchName);
73
+
74
+ const { space: activeBranchSpace } = await getOrCreateBranchSpace({
65
75
  metaspace,
66
- localSpace,
67
76
  vcsPath,
77
+ branchName,
78
+ });
79
+
80
+ const { space: workspaceSpace } = await getOrCreateWorkspaceProjectionSpace({
81
+ metaspace,
82
+ workspaceRoot: activeWorktreeDir,
83
+ vcsFolderName,
84
+ backingSpace: activeBranchSpace,
85
+ });
86
+
87
+ const statusRes = await executeVcsStatus({
88
+ metaspace,
89
+ localSpace,
90
+ activeBranchSpace,
91
+ workspaceSpace,
92
+ indexIbGib,
68
93
  repoRoot,
69
94
  targetDir: absTargetDir,
70
95
  vcsFolderName,
71
96
  });
72
97
 
73
- const { branchName, staged, modified, deleted, untracked, pendingComments } = statusRes;
98
+ const { staged, modified, deleted, untracked, pendingComments } = statusRes;
74
99
 
75
100
  const commentsByTarget = new Map<string, PendingCommentInfo[]>();
76
101
  for (const c of pendingComments) {
@@ -80,77 +105,57 @@ export async function executeStatusCmd({
80
105
  }
81
106
 
82
107
  if (!quiet) {
83
- console.log(`On branch ${branchName} (I: 9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b)`);
84
-
85
- if (staged.length > 0) {
86
- console.log('\nChanges to be committed:');
87
- for (const item of staged) {
88
- const itemComments = commentsByTarget.get(item.path) || [];
89
- console.log(` staged: ${item.path}`);
90
- if (itemComments.length === 0) {
91
- console.log(` (hint: no comment file found for ${item.path} - run 'vcs gmsg')`);
92
- } else if (comments) {
93
- for (const comm of itemComments) {
94
- console.log(` [comment: ${comm.commentRelPath}]`);
95
- const lines = comm.content.trim().split('\n');
96
- for (const line of lines) {
97
- console.log(` ${line}`);
98
- }
99
- }
108
+ console.log(`On branch ${statusRes.branchName} (I: 5e6f7a8b9c10d11e12f13a14b15c16d1)`);
109
+
110
+ if (staged.length === 0 && modified.length === 0 && deleted.length === 0 && untracked.length === 0 && pendingComments.length === 0) {
111
+ console.log('nothing to commit, working tree clean');
112
+ } else {
113
+ if (staged.length > 0) {
114
+ console.log('\nChanges to be committed:');
115
+ console.log(' (use "vcs reset <file>..." to unstage)');
116
+ for (const item of staged) {
117
+ const typePrefix = item.fsType === 'folder' ? 'directory: ' : '';
118
+ console.log(`\tnew file: ${typePrefix}${item.path}`);
100
119
  }
101
120
  }
102
- }
103
121
 
104
- if (modified.length > 0 || deleted.length > 0) {
105
- console.log('\nChanges not staged for commit:');
106
- for (const item of modified) {
107
- const itemComments = commentsByTarget.get(item.path) || [];
108
- console.log(` modified: ${item.path}`);
109
- if (comments && itemComments.length > 0) {
110
- for (const comm of itemComments) {
111
- console.log(` [comment: ${comm.commentRelPath}]`);
112
- const lines = comm.content.trim().split('\n');
113
- for (const line of lines) {
114
- console.log(` ${line}`);
115
- }
116
- }
122
+ if (modified.length > 0 || deleted.length > 0) {
123
+ console.log('\nChanges not staged for commit:');
124
+ console.log(' (use "vcs add <file>..." to update what will be committed)');
125
+ console.log(' (use "vcs restore <file>..." to discard changes in working directory)');
126
+ for (const item of modified) {
127
+ console.log(`\tmodified: ${item.path}`);
128
+ }
129
+ for (const item of deleted) {
130
+ console.log(`\tdeleted: ${item.path}`);
117
131
  }
118
132
  }
119
- for (const item of deleted) {
120
- console.log(` deleted: ${item.path}`);
121
- }
122
- }
123
133
 
124
- if (untracked.length > 0) {
125
- console.log('\nUntracked files:');
126
- for (const item of untracked) {
127
- console.log(` untracked:${item.path}`);
134
+ if (untracked.length > 0) {
135
+ console.log('\nUntracked files:');
136
+ console.log(' (use "vcs add <file>..." to include in what will be committed)');
137
+ for (const item of untracked) {
138
+ const suffix = item.fsType === 'folder' ? '/' : '';
139
+ console.log(`\t${item.path}${suffix}`);
140
+ }
128
141
  }
129
- }
130
142
 
131
- // Pending folder-level comments
132
- const folderComments = pendingComments.filter(c => c.targetType === 'folder');
133
- if (folderComments.length > 0) {
134
- console.log('\nPending folder comments:');
135
- for (const fc of folderComments) {
136
- const folderLabel = fc.targetRelPath ? fc.targetRelPath : '(root)';
137
- console.log(` folder: ${folderLabel} [${fc.commentRelPath}]`);
138
- if (comments) {
139
- const lines = fc.content.trim().split('\n');
140
- for (const line of lines) {
141
- console.log(` ${line}`);
143
+ if (pendingComments.length > 0) {
144
+ console.log('\nPending companion comments:');
145
+ console.log(' (will be attached to items upon "vcs commit")');
146
+ for (const comment of pendingComments) {
147
+ const targetLabel = comment.targetRelPath ? comment.targetRelPath : '(root)';
148
+ console.log(`\tcomment on [${targetLabel}]: ${comment.commentRelPath}`);
149
+ if (comments) {
150
+ console.log(`\t Preview: ${comment.content.slice(0, 80).replace(/\n/g, ' ')}...`);
142
151
  }
143
152
  }
144
153
  }
145
154
  }
146
-
147
- if (staged.length === 0 && modified.length === 0 && deleted.length === 0 && untracked.length === 0) {
148
- console.log('nothing to commit, working tree clean');
149
- }
150
155
  }
151
156
 
152
157
  return {
153
- branchName,
158
+ branchName: statusRes.branchName,
154
159
  staged,
155
160
  modified,
156
161
  deleted,
@@ -158,11 +163,11 @@ export async function executeStatusCmd({
158
163
  pendingComments,
159
164
  };
160
165
  } catch (error) {
161
- console.error(`${lc} ${extractErrorMsg(error)} (E: 5e6f7a8b9c10d11e12f13a14b15c6d7e)`);
166
+ console.error(`${lc} ${extractErrorMsg(error)} (E: 6f7a8b9c10d11e12f13a14b15c16d17e)`);
162
167
  throw error;
163
168
  } finally {
164
169
  if (logalot) {
165
- console.log(`${lc} complete. (I: 6f7a8b9c10d11e12f13a14b15c6d7e8f)`);
170
+ console.log(`${lc} complete. (I: 8a9b10c11d12e13f14a15b16c17d18e1)`);
166
171
  }
167
172
  }
168
173
  }
@@ -0,0 +1,112 @@
1
+ /**
2
+ * @module vcs-projection-helper
3
+ *
4
+ * CLI-specific filesystem projection helpers for reading and writing `.vcsgib/vcs_index_projection.json`.
5
+ * Strictly housed in `apps/vcs-gib` CLI layer to maintain pure isolation from `core-gib`.
6
+ */
7
+
8
+ import path from 'node:path';
9
+ import fs from 'node:fs/promises';
10
+
11
+ import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
12
+ import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
13
+ import { IbGibSpaceAny } from '@ibgib/core-gib/dist/witness/space/space-base-v1.mjs';
14
+ import { getIbGibsFromCache_fallbackToSpaces } from '@ibgib/core-gib/dist/common/other/ibgib-helper.mjs';
15
+ import { B2tFSIndexIbGib_V1 } from '@ibgib/core-gib/dist/vcs/index/index-types.mjs';
16
+ import { GLOBAL_LOG_A_LOT } from '../vcs-gib-constants.mjs';
17
+
18
+ const lcFile = `[vcs-projection-helper]`;
19
+ const logalot = GLOBAL_LOG_A_LOT;
20
+
21
+ /**
22
+ * Retrieves authoritative B2tFSIndexIbGib_V1 from space by reading the `.vcsgib/vcs_index_projection.json` pointer on disk.
23
+ */
24
+ export async function readVcsIndexProjectionFromDisk({
25
+ vcsPath,
26
+ space,
27
+ }: {
28
+ vcsPath: string;
29
+ space: IbGibSpaceAny;
30
+ }): Promise<B2tFSIndexIbGib_V1 | undefined> {
31
+ const lc = `${lcFile}[${readVcsIndexProjectionFromDisk.name}]`;
32
+ try {
33
+ if (logalot) {
34
+ console.log(`${lc} starting... (I: 7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b)`);
35
+ }
36
+
37
+ if (!vcsPath) {
38
+ return undefined;
39
+ }
40
+
41
+ const projPath = path.join(vcsPath, 'vcs_index_projection.json');
42
+ let indexAddr: string | undefined;
43
+ try {
44
+ const raw = await fs.readFile(projPath, 'utf8');
45
+ const parsed = JSON.parse(raw);
46
+ indexAddr = parsed.indexAddr;
47
+ } catch {
48
+ return undefined;
49
+ }
50
+
51
+ if (!indexAddr) {
52
+ return undefined;
53
+ }
54
+
55
+ const ibgibs = await getIbGibsFromCache_fallbackToSpaces({
56
+ addrs: [indexAddr],
57
+ space,
58
+ });
59
+
60
+ const indexIbGib = ibgibs?.at(0) as B2tFSIndexIbGib_V1;
61
+ return indexIbGib;
62
+ } catch (error) {
63
+ console.error(`${lc} ${extractErrorMsg(error)} (E: 8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c)`);
64
+ throw error;
65
+ } finally {
66
+ if (logalot) {
67
+ console.log(`${lc} complete. (I: 9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d)`);
68
+ }
69
+ }
70
+ }
71
+
72
+ /**
73
+ * Writes read-only JSON projection cache of repository index to disk.
74
+ */
75
+ export async function writeVcsIndexProjectionToDisk({
76
+ vcsPath,
77
+ indexIbGib,
78
+ }: {
79
+ vcsPath: string;
80
+ indexIbGib: B2tFSIndexIbGib_V1;
81
+ }): Promise<void> {
82
+ const lc = `${lcFile}[${writeVcsIndexProjectionToDisk.name}]`;
83
+ try {
84
+ if (logalot) {
85
+ console.log(`${lc} starting... (I: 3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b)`);
86
+ }
87
+
88
+ await fs.mkdir(vcsPath, { recursive: true });
89
+
90
+ const indexAddr = getIbGibAddr({ ibGib: indexIbGib });
91
+ const projectionObj = {
92
+ _isReadOnlyProjection: true,
93
+ _comment: 'STRICTLY READ-ONLY PROJECTION GENERATED FROM B2TFSINDEXIBGIB_V1 IN LOCALSPACE',
94
+ indexAddr,
95
+ spaceId: indexIbGib.data?.mySpaceId,
96
+ activeBranch: indexIbGib.data?.activeBranch || 'main',
97
+ stagedCount: (indexIbGib.data?.staged_item || []).length,
98
+ stagedPaths: indexIbGib.data?.stagedPaths || {},
99
+ updatedAt: new Date().toISOString(),
100
+ };
101
+
102
+ const projFile = path.join(vcsPath, 'vcs_index_projection.json');
103
+ await fs.writeFile(projFile, JSON.stringify(projectionObj, null, 2), 'utf8');
104
+ } catch (error) {
105
+ console.error(`${lc} ${extractErrorMsg(error)} (E: 4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c)`);
106
+ throw error;
107
+ } finally {
108
+ if (logalot) {
109
+ console.log(`${lc} complete. (I: 5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d)`);
110
+ }
111
+ }
112
+ }
@@ -17,11 +17,11 @@ import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
17
17
  import { getFromSpace, persistTransformResult } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
18
18
 
19
19
  import { bootstrapVcsMetaspace } from '../../bootstrap/node-bootstrap.mjs';
20
- import { getB2tFSItemIb } from '../item/item-atom-helper.mjs';
21
- import { getOrCreateBranchSpace } from './branch-space-helper.mjs';
22
- import { populateBranchSpaceFromGraph } from './branch-graph-helper.mjs';
23
- import { getSpaceQualifiedIbGibAddr, parseSpaceQualifiedIbGibAddr } from '../index/index-helper.mjs';
24
- import { B2tFSItemIbGib_V1 } from '../item/item-types.mjs';
20
+ import { getB2tFSItemIb } from '@ibgib/core-gib/dist/vcs/item/item-atom-helper.mjs';
21
+ import { getOrCreateBranchSpace } from '@ibgib/node-gib/dist/vcs/branch-space-helper.mjs';
22
+ import { populateBranchSpaceFromGraph } from '@ibgib/core-gib/dist/vcs/branch/branch-graph-helper.mjs';
23
+ import { getSpaceQualifiedIbGibAddr, parseSpaceQualifiedIbGibAddr } from '@ibgib/core-gib/dist/vcs/index/index-helper.mjs';
24
+ import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/vcs/item/item-types.mjs';
25
25
 
26
26
  const lc = `[apps/vcs-gib/src/engine/branch/branch-space.respec.node.mts]`;
27
27
 
@@ -27,10 +27,10 @@ import { BinIbGib_V1 } from '@ibgib/core-gib/dist/common/bin/bin-types.mjs';
27
27
  import { putInSpace, persistTransformResult, registerNewIbGib, getFromSpace, getLatestAddrs } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
28
28
 
29
29
  import { bootstrapVcsMetaspace } from '../../bootstrap/node-bootstrap.mjs';
30
- import { getOrCreateBranchSpace } from '../branch/branch-space-helper.mjs';
31
- import { createB2tFSItemIbGib, evolveB2tFSItemIbGib } from '../item/item-helper.mjs';
32
- import { B2tFSItemIbGib_V1, BINARY_REL8N_NAME } from '../item/item-types.mjs';
33
- import { B2tFS3WayGraftStrategy } from './b2tfs-3way-graft-strategy.mjs';
30
+ import { getOrCreateBranchSpace } from '@ibgib/node-gib/dist/vcs/branch-space-helper.mjs';
31
+ import { createB2tFSItemIbGib, evolveB2tFSItemIbGib } from '@ibgib/core-gib/dist/vcs/item/item-helper.mjs';
32
+ import { B2tFSItemIbGib_V1, BINARY_REL8N_NAME } from '@ibgib/core-gib/dist/vcs/item/item-types.mjs';
33
+ import { B2tFS3WayGraftStrategy } from '@ibgib/core-gib/dist/vcs/merge/b2tfs-3way-graft-strategy.mjs';
34
34
 
35
35
  const lc = `[apps/vcs-gib/src/engine/merge/b2tfs-sync-comments.respec.node.mts]`;
36
36
  const graftStrategySvc = GraftStrategyService.instance;
@@ -20,8 +20,8 @@ import { IbGibAddr } from '@ibgib/ts-gib/dist/types.mjs';
20
20
  import { getLatestAddrs } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
21
21
  import { IbGibSpaceAny } from '@ibgib/core-gib/dist/witness/space/space-base-v1.mjs';
22
22
 
23
- import { B2tFSBranchIbGib_V1 } from '../engine/branch/branch-types.mjs';
24
- import { B2tFSItemIbGib_V1 } from '../engine/item/item-types.mjs';
23
+ import { B2tFSBranchIbGib_V1 } from '@ibgib/core-gib/dist/vcs/branch/branch-types.mjs';
24
+ import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/vcs/item/item-types.mjs';
25
25
 
26
26
 
27
27
  // ─────────────────────────────────────────────────────────────────────────────
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @module vcs-gib.respec.node
3
- *
3
+ *
4
4
  * Full Engine Cycle Integration Tests for @ibgib/vcs-gib.
5
5
  * Tests Metaspace bootstrap, canonical ib atoms, item creation, branch spaces, and index tracking.
6
6
  */
@@ -8,17 +8,20 @@
8
8
  import path from 'node:path';
9
9
  import fs from 'node:fs/promises';
10
10
 
11
- import {
12
- respecfully, ifWe, iReckon
13
- } from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
11
+ import { respecfully, ifWe, iReckon } from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
14
12
  import { ROOT } from '@ibgib/ts-gib/dist/V1/constants.mjs';
15
13
  import { Factory_V1 } from '@ibgib/ts-gib/dist/V1/factory.mjs';
14
+ import { getB2tFSItemIb } from '@ibgib/core-gib/dist/vcs/item/item-atom-helper.mjs';
15
+ import {
16
+ createB2tFSBranchIbGib, getB2tFSBranchSpaceName
17
+ } from '@ibgib/core-gib/dist/vcs/branch/branch-helper.mjs';
18
+ import {
19
+ createB2tFSIndexIbGib, getSpaceQualifiedIbGibAddr,
20
+ parseSpaceQualifiedIbGibAddr
21
+ } from '@ibgib/core-gib/dist/vcs/index/index-helper.mjs';
22
+ import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/vcs/item/item-types.mjs';
16
23
 
17
24
  import { bootstrapVcsMetaspace } from './bootstrap/node-bootstrap.mjs';
18
- import { getB2tFSItemIb } from './engine/item/item-atom-helper.mjs';
19
- import { createB2tFSBranchIbGib, getB2tFSBranchSpaceName } from './engine/branch/branch-helper.mjs';
20
- import { createB2tFSIndexIbGib, getSpaceQualifiedIbGibAddr, parseSpaceQualifiedIbGibAddr } from './engine/index/index-helper.mjs';
21
- import { B2tFSItemIbGib_V1 } from './engine/item/item-types.mjs';
22
25
 
23
26
  const lc = `[apps/vcs-gib/src/vcs-gib.respec.node.mts]`;
24
27