@gitgov/core 2.2.0 → 2.3.0
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.
- package/README.md +20 -5
- package/dist/src/{agent_runner-Cs5HXt4h.d.ts → agent_runner-D7JahEKk.d.ts} +7 -1198
- package/dist/src/fs.d.ts +28 -7
- package/dist/src/fs.js +57 -14
- package/dist/src/fs.js.map +1 -1
- package/dist/src/github.d.ts +2 -1
- package/dist/src/{index-D1RVufxB.d.ts → index-Bhc341pf.d.ts} +2 -65
- package/dist/src/index.d.ts +49 -58
- package/dist/src/index.js +5051 -5059
- package/dist/src/index.js.map +1 -1
- package/dist/src/memory.d.ts +20 -4
- package/dist/src/memory.js +22 -1
- package/dist/src/memory.js.map +1 -1
- package/dist/src/{memory_file_lister-CfHtByeZ.d.ts → memory_file_lister-C978PA8g.d.ts} +1 -1
- package/dist/src/prisma.d.ts +71 -0
- package/dist/src/prisma.js +67 -0
- package/dist/src/prisma.js.map +1 -0
- package/dist/src/record_projection.types-B8AM7u8U.d.ts +1207 -0
- package/dist/src/record_store-BXKWqon5.d.ts +64 -0
- package/package.json +5 -1
package/dist/src/fs.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { R as RecordStore, I as IdEncoder
|
|
2
|
-
export { D as DEFAULT_ID_ENCODER
|
|
3
|
-
import { C as
|
|
4
|
-
export {
|
|
1
|
+
import { R as RecordStore, I as IdEncoder } from './record_store-BXKWqon5.js';
|
|
2
|
+
export { D as DEFAULT_ID_ENCODER } from './record_store-BXKWqon5.js';
|
|
3
|
+
import { C as ConfigStore, G as GitGovConfig, I as IGitModule, a as GitModuleDependencies, E as ExecOptions, b as ExecResult, c as ChangedFile, d as GetCommitHistoryOptions, e as CommitInfo, f as CommitAuthor } from './index-Bhc341pf.js';
|
|
4
|
+
export { F as FsFileListerOptions } from './index-Bhc341pf.js';
|
|
5
|
+
import { C as ConfigManager, S as SessionManager, I as ILintModule, L as LintOptions, a as LintReport, F as FixRecordOptions, b as FixReport, R as RecordStores, c as LintRecordContext, d as LintResult, e as IProjectInitializer, E as EnvironmentValidation, f as ISyncStateModule, g as SyncStateModuleDependencies, h as StateDeltaFile, i as ConflictDiff, j as IntegrityViolation, A as AuditStateOptions, k as AuditStateReport, l as SyncStatePushOptions, m as SyncStatePushResult, n as SyncStatePullOptions, o as SyncStatePullResult, p as SyncStateResolveOptions, q as SyncStateResolveResult, r as IEventStream, s as IAgentRunner, P as ProtocolHandlerRegistry, t as AgentRunnerDependencies, u as RunOptions, v as AgentResponse } from './agent_runner-D7JahEKk.js';
|
|
6
|
+
export { y as FsFileLister, w as FsKeyProvider, x as FsKeyProviderOptions } from './agent_runner-D7JahEKk.js';
|
|
5
7
|
import { S as SessionStore, G as GitGovSession } from './key_provider-CRpHFGjN.js';
|
|
8
|
+
import { I as IRecordProjector, G as GitGovRecord, a as IRecordProjection, b as IndexData, P as ProjectionContext } from './record_projection.types-B8AM7u8U.js';
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
11
|
* Serializer for FsRecordStore - allows custom serialization
|
|
@@ -237,8 +240,8 @@ interface FsLintModuleDependencies {
|
|
|
237
240
|
lintModule: ILintModule;
|
|
238
241
|
/** Record stores for reference lookups (OPTIONAL) */
|
|
239
242
|
stores?: RecordStores;
|
|
240
|
-
/**
|
|
241
|
-
|
|
243
|
+
/** Record projector for reference resolution (OPTIONAL) */
|
|
244
|
+
projector?: IRecordProjector;
|
|
242
245
|
/** FileSystem abstraction for I/O (OPTIONAL, default: Node.js fs) */
|
|
243
246
|
fileSystem?: FileSystem;
|
|
244
247
|
}
|
|
@@ -1357,4 +1360,22 @@ declare class FsAgentRunner implements IAgentRunner {
|
|
|
1357
1360
|
*/
|
|
1358
1361
|
declare function createAgentRunner(deps: AgentRunnerDependencies): IAgentRunner;
|
|
1359
1362
|
|
|
1360
|
-
|
|
1363
|
+
type FsRecordProjectionOptions = {
|
|
1364
|
+
basePath: string;
|
|
1365
|
+
};
|
|
1366
|
+
/**
|
|
1367
|
+
* FsRecordProjection - Filesystem IRecordProjection for CLI.
|
|
1368
|
+
*
|
|
1369
|
+
* Writes IndexData as JSON to .gitgov/index.json using atomic write
|
|
1370
|
+
* (write to temp file + rename) to prevent corruption on crash.
|
|
1371
|
+
*/
|
|
1372
|
+
declare class FsRecordProjection implements IRecordProjection {
|
|
1373
|
+
private readonly indexPath;
|
|
1374
|
+
constructor(options: FsRecordProjectionOptions);
|
|
1375
|
+
persist(data: IndexData, _context: ProjectionContext): Promise<void>;
|
|
1376
|
+
read(_context: ProjectionContext): Promise<IndexData | null>;
|
|
1377
|
+
exists(_context: ProjectionContext): Promise<boolean>;
|
|
1378
|
+
clear(_context: ProjectionContext): Promise<void>;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
export { type FileSystem, FsAgentRunner, AgentRunnerDependencies as FsAgentRunnerDependencies, FsConfigStore, type FsFixOptions, FsLintModule, type FsLintModuleDependencies, type FsLintOptions, FsProjectInitializer, FsRecordProjection, type FsRecordProjectionOptions, FsRecordStore, FsSessionStore, FsSyncStateModule, FsWatcherStateModule, LocalGitModule as GitModule, GitModuleDependencies, type IFsLintModule, IGitModule, LocalGitModule, createAgentRunner, createConfigManager, createSessionManager, findGitgovRoot, findProjectRoot, getGitgovPath, isGitgovProject, resetDiscoveryCache };
|
package/dist/src/fs.js
CHANGED
|
@@ -3519,25 +3519,25 @@ var FsLintModule = class {
|
|
|
3519
3519
|
this.projectRoot = dependencies.projectRoot;
|
|
3520
3520
|
this.lintModule = dependencies.lintModule;
|
|
3521
3521
|
this.fileSystem = dependencies.fileSystem ?? {
|
|
3522
|
-
readFile: async (
|
|
3523
|
-
return promises.readFile(
|
|
3522
|
+
readFile: async (path13, encoding) => {
|
|
3523
|
+
return promises.readFile(path13, encoding);
|
|
3524
3524
|
},
|
|
3525
|
-
writeFile: async (
|
|
3526
|
-
await promises.writeFile(
|
|
3525
|
+
writeFile: async (path13, content) => {
|
|
3526
|
+
await promises.writeFile(path13, content, "utf-8");
|
|
3527
3527
|
},
|
|
3528
|
-
exists: async (
|
|
3528
|
+
exists: async (path13) => {
|
|
3529
3529
|
try {
|
|
3530
|
-
await promises.access(
|
|
3530
|
+
await promises.access(path13);
|
|
3531
3531
|
return true;
|
|
3532
3532
|
} catch {
|
|
3533
3533
|
return false;
|
|
3534
3534
|
}
|
|
3535
3535
|
},
|
|
3536
|
-
unlink: async (
|
|
3537
|
-
await promises.unlink(
|
|
3536
|
+
unlink: async (path13) => {
|
|
3537
|
+
await promises.unlink(path13);
|
|
3538
3538
|
},
|
|
3539
|
-
readdir: async (
|
|
3540
|
-
return readdir(
|
|
3539
|
+
readdir: async (path13) => {
|
|
3540
|
+
return readdir(path13);
|
|
3541
3541
|
}
|
|
3542
3542
|
};
|
|
3543
3543
|
}
|
|
@@ -5818,7 +5818,7 @@ var FsSyncStateModule = class {
|
|
|
5818
5818
|
throw new Error("LintModule is required for SyncStateModule");
|
|
5819
5819
|
}
|
|
5820
5820
|
if (!dependencies.indexer) {
|
|
5821
|
-
throw new Error("
|
|
5821
|
+
throw new Error("RecordProjector is required for SyncStateModule");
|
|
5822
5822
|
}
|
|
5823
5823
|
this.git = dependencies.git;
|
|
5824
5824
|
this.config = dependencies.config;
|
|
@@ -7307,7 +7307,7 @@ To avoid losing your changes, push first or use --force to overwrite.`,
|
|
|
7307
7307
|
}
|
|
7308
7308
|
}
|
|
7309
7309
|
if (shouldReindex) {
|
|
7310
|
-
logger6.info("Invoking
|
|
7310
|
+
logger6.info("Invoking RecordProjector.generateIndex() after pull...");
|
|
7311
7311
|
try {
|
|
7312
7312
|
await this.indexer.generateIndex();
|
|
7313
7313
|
logger6.info("Index regenerated successfully");
|
|
@@ -7552,7 +7552,7 @@ Signed-off-by: ${actorId}`;
|
|
|
7552
7552
|
log("Temp directory cleaned up");
|
|
7553
7553
|
} catch {
|
|
7554
7554
|
}
|
|
7555
|
-
logger6.info("Invoking
|
|
7555
|
+
logger6.info("Invoking RecordProjector.generateIndex() after conflict resolution...");
|
|
7556
7556
|
try {
|
|
7557
7557
|
await this.indexer.generateIndex();
|
|
7558
7558
|
logger6.info("Index regenerated successfully after conflict resolution");
|
|
@@ -8453,7 +8453,50 @@ var FsAgentRunner = class {
|
|
|
8453
8453
|
function createAgentRunner(deps) {
|
|
8454
8454
|
return new FsAgentRunner(deps);
|
|
8455
8455
|
}
|
|
8456
|
+
var FsRecordProjection = class {
|
|
8457
|
+
indexPath;
|
|
8458
|
+
constructor(options) {
|
|
8459
|
+
this.indexPath = path9.join(options.basePath, "index.json");
|
|
8460
|
+
}
|
|
8461
|
+
async persist(data, _context) {
|
|
8462
|
+
const dir = path9.dirname(this.indexPath);
|
|
8463
|
+
await fs.mkdir(dir, { recursive: true });
|
|
8464
|
+
const tmpPath = `${this.indexPath}.tmp`;
|
|
8465
|
+
const content = JSON.stringify(data, null, 2);
|
|
8466
|
+
await fs.writeFile(tmpPath, content, "utf-8");
|
|
8467
|
+
await fs.rename(tmpPath, this.indexPath);
|
|
8468
|
+
}
|
|
8469
|
+
async read(_context) {
|
|
8470
|
+
try {
|
|
8471
|
+
const content = await fs.readFile(this.indexPath, "utf-8");
|
|
8472
|
+
return JSON.parse(content);
|
|
8473
|
+
} catch (error) {
|
|
8474
|
+
if (error.code === "ENOENT") {
|
|
8475
|
+
return null;
|
|
8476
|
+
}
|
|
8477
|
+
throw error;
|
|
8478
|
+
}
|
|
8479
|
+
}
|
|
8480
|
+
async exists(_context) {
|
|
8481
|
+
try {
|
|
8482
|
+
await fs.access(this.indexPath);
|
|
8483
|
+
return true;
|
|
8484
|
+
} catch {
|
|
8485
|
+
return false;
|
|
8486
|
+
}
|
|
8487
|
+
}
|
|
8488
|
+
async clear(_context) {
|
|
8489
|
+
try {
|
|
8490
|
+
await fs.unlink(this.indexPath);
|
|
8491
|
+
} catch (error) {
|
|
8492
|
+
if (error.code === "ENOENT") {
|
|
8493
|
+
return;
|
|
8494
|
+
}
|
|
8495
|
+
throw error;
|
|
8496
|
+
}
|
|
8497
|
+
}
|
|
8498
|
+
};
|
|
8456
8499
|
|
|
8457
|
-
export { DEFAULT_ID_ENCODER, FsAgentRunner, FsConfigStore, FsFileLister, FsKeyProvider, FsLintModule, FsProjectInitializer, FsRecordStore, FsSessionStore, FsSyncStateModule, FsWatcherStateModule, LocalGitModule as GitModule, LocalGitModule, createAgentRunner, createConfigManager, createSessionManager, findGitgovRoot, findProjectRoot, getGitgovPath, isGitgovProject, resetDiscoveryCache };
|
|
8500
|
+
export { DEFAULT_ID_ENCODER, FsAgentRunner, FsConfigStore, FsFileLister, FsKeyProvider, FsLintModule, FsProjectInitializer, FsRecordProjection, FsRecordStore, FsSessionStore, FsSyncStateModule, FsWatcherStateModule, LocalGitModule as GitModule, LocalGitModule, createAgentRunner, createConfigManager, createSessionManager, findGitgovRoot, findProjectRoot, getGitgovPath, isGitgovProject, resetDiscoveryCache };
|
|
8458
8501
|
//# sourceMappingURL=fs.js.map
|
|
8459
8502
|
//# sourceMappingURL=fs.js.map
|