@rk0429/agentic-relay 19.10.1 → 19.12.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/dist/application/core-management-service.d.ts +83 -0
- package/dist/application/core-management-service.js +687 -0
- package/dist/application/core-management-service.js.map +1 -0
- package/dist/application/task-service.d.ts +2 -1
- package/dist/application/task-service.js +16 -1
- package/dist/application/task-service.js.map +1 -1
- package/dist/bin/relay.d.ts +20 -0
- package/dist/bin/relay.js +145 -7
- package/dist/bin/relay.js.map +1 -1
- package/dist/core/types.d.ts +6 -0
- package/dist/domain/core-manifest.d.ts +18 -0
- package/dist/domain/core-manifest.js +233 -0
- package/dist/domain/core-manifest.js.map +1 -0
- package/dist/interfaces/cli/relay-cli-args.d.ts +14 -0
- package/dist/interfaces/cli/relay-cli-args.js +83 -0
- package/dist/interfaces/cli/relay-cli-args.js.map +1 -1
- package/dist/interfaces/mcp/relay-mcp-server.js +79 -6
- package/dist/interfaces/mcp/relay-mcp-server.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type CoreManifest } from "../domain/core-manifest.js";
|
|
2
|
+
import type { ProcessExecutor } from "../infrastructure/process/process-executor.js";
|
|
3
|
+
export type AgentsState = "submodule" | "directory-with-manifest" | "directory-without-manifest" | "not-found";
|
|
4
|
+
export type ConflictResolution = "overwrite" | "skip" | "backup";
|
|
5
|
+
export interface ConflictResolver {
|
|
6
|
+
(filePath: string, isRequired: boolean): Promise<ConflictResolution>;
|
|
7
|
+
}
|
|
8
|
+
export interface FileConflict {
|
|
9
|
+
path: string;
|
|
10
|
+
resolution: ConflictResolution;
|
|
11
|
+
}
|
|
12
|
+
export interface CoreSetupResult {
|
|
13
|
+
action: "created" | "merged" | "converted-from-submodule" | "force-reinstalled";
|
|
14
|
+
agentsDir: string;
|
|
15
|
+
manifest: CoreManifest;
|
|
16
|
+
backedUpFiles: string[];
|
|
17
|
+
skippedFiles: string[];
|
|
18
|
+
conflicts: FileConflict[];
|
|
19
|
+
}
|
|
20
|
+
export interface CoreUpdateResult {
|
|
21
|
+
agentsDir: string;
|
|
22
|
+
manifest: CoreManifest;
|
|
23
|
+
added: string[];
|
|
24
|
+
updated: string[];
|
|
25
|
+
removedFromManifest: string[];
|
|
26
|
+
skipped: string[];
|
|
27
|
+
conflicts: FileConflict[];
|
|
28
|
+
}
|
|
29
|
+
export interface CoreRemoveResult {
|
|
30
|
+
removedFiles: string[];
|
|
31
|
+
keptFiles: string[];
|
|
32
|
+
agentsDirRemoved: boolean;
|
|
33
|
+
symlinkRemoved: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare class CoreManagementService {
|
|
36
|
+
private readonly deps;
|
|
37
|
+
constructor(deps: {
|
|
38
|
+
processExecutor: ProcessExecutor;
|
|
39
|
+
cwd: string;
|
|
40
|
+
env: NodeJS.ProcessEnv;
|
|
41
|
+
});
|
|
42
|
+
setup(options: {
|
|
43
|
+
source?: string;
|
|
44
|
+
branch?: string;
|
|
45
|
+
force?: boolean;
|
|
46
|
+
conflictResolver?: ConflictResolver;
|
|
47
|
+
}): Promise<CoreSetupResult>;
|
|
48
|
+
update(options: {
|
|
49
|
+
source?: string;
|
|
50
|
+
branch?: string;
|
|
51
|
+
conflictResolver?: ConflictResolver;
|
|
52
|
+
}): Promise<CoreUpdateResult>;
|
|
53
|
+
remove(options: {
|
|
54
|
+
keepLocal?: boolean;
|
|
55
|
+
}): Promise<CoreRemoveResult>;
|
|
56
|
+
private agentsDir;
|
|
57
|
+
private claudePath;
|
|
58
|
+
private detectAgentsState;
|
|
59
|
+
private isLegacySubmodule;
|
|
60
|
+
private prepareForceReinstall;
|
|
61
|
+
private removeManifestTrackedFiles;
|
|
62
|
+
private convertLegacySubmodule;
|
|
63
|
+
private collectSubmoduleLocalFiles;
|
|
64
|
+
private removeAgentsSectionFromGitmodules;
|
|
65
|
+
private fetchDist;
|
|
66
|
+
private tryGitArchive;
|
|
67
|
+
private installDistIntoAgents;
|
|
68
|
+
private restoreBackedUpLocalFiles;
|
|
69
|
+
private ensureClaudeSymlink;
|
|
70
|
+
private removeClaudeSymlink;
|
|
71
|
+
private collectKeptFiles;
|
|
72
|
+
private executeGit;
|
|
73
|
+
private resolveConflict;
|
|
74
|
+
private backupExistingPath;
|
|
75
|
+
private nextBackupPath;
|
|
76
|
+
private replaceEntryWithCopy;
|
|
77
|
+
private copyEntry;
|
|
78
|
+
private collectRelativeFiles;
|
|
79
|
+
private collectRelativeFilesRecursive;
|
|
80
|
+
private tryComputeFileHash;
|
|
81
|
+
private pathKind;
|
|
82
|
+
private toWorkspaceRelative;
|
|
83
|
+
}
|