@braingrid/cli 0.1.0 → 0.1.1
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/CHANGELOG.md +36 -0
- package/README.md +21 -17
- package/dist/cli.js +37 -16
- package/dist/cli.js.map +1 -1
- package/dist/handlers/agent.handlers.d.ts +12 -0
- package/dist/handlers/agent.handlers.d.ts.map +1 -0
- package/dist/handlers/agent.handlers.js +130 -0
- package/dist/handlers/agent.handlers.js.map +1 -0
- package/dist/handlers/index.d.ts +1 -0
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/index.js +1 -0
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/init.handlers.js +4 -4
- package/dist/handlers/init.handlers.js.map +1 -1
- package/dist/handlers/project.handlers.d.ts +2 -3
- package/dist/handlers/project.handlers.d.ts.map +1 -1
- package/dist/handlers/project.handlers.js +80 -71
- package/dist/handlers/project.handlers.js.map +1 -1
- package/dist/handlers/requirement.handlers.d.ts.map +1 -1
- package/dist/handlers/requirement.handlers.js +21 -20
- package/dist/handlers/requirement.handlers.js.map +1 -1
- package/dist/handlers/status.handlers.d.ts.map +1 -1
- package/dist/handlers/status.handlers.js +5 -2
- package/dist/handlers/status.handlers.js.map +1 -1
- package/dist/handlers/task.handlers.d.ts.map +1 -1
- package/dist/handlers/task.handlers.js +45 -26
- package/dist/handlers/task.handlers.js.map +1 -1
- package/dist/rpc/server.d.ts +2 -0
- package/dist/rpc/server.d.ts.map +1 -1
- package/dist/rpc/server.js +28 -11
- package/dist/rpc/server.js.map +1 -1
- package/dist/services/agent-service.d.ts +29 -0
- package/dist/services/agent-service.d.ts.map +1 -0
- package/dist/services/agent-service.js +273 -0
- package/dist/services/agent-service.js.map +1 -0
- package/dist/services/credential-store.d.ts.map +1 -1
- package/dist/services/credential-store.js +1 -0
- package/dist/services/credential-store.js.map +1 -1
- package/dist/services/internal/github-service.d.ts +67 -0
- package/dist/services/internal/github-service.d.ts.map +1 -0
- package/dist/services/internal/github-service.js +81 -0
- package/dist/services/internal/github-service.js.map +1 -0
- package/dist/services/internal/repository-service.d.ts +79 -0
- package/dist/services/internal/repository-service.d.ts.map +1 -0
- package/dist/services/internal/repository-service.js +88 -0
- package/dist/services/internal/repository-service.js.map +1 -0
- package/dist/types/github.d.ts +105 -0
- package/dist/types/github.d.ts.map +1 -0
- package/dist/types/github.js +6 -0
- package/dist/types/github.js.map +1 -0
- package/dist/utils/cli-tools.d.ts.map +1 -1
- package/dist/utils/cli-tools.js +0 -1
- package/dist/utils/cli-tools.js.map +1 -1
- package/dist/utils/git.d.ts +5 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +13 -0
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/id-normalization.d.ts +26 -0
- package/dist/utils/id-normalization.d.ts.map +1 -0
- package/dist/utils/id-normalization.js +45 -0
- package/dist/utils/id-normalization.js.map +1 -0
- package/dist/utils/local-store.d.ts +7 -7
- package/dist/utils/local-store.d.ts.map +1 -1
- package/dist/utils/local-store.js +29 -17
- package/dist/utils/local-store.js.map +1 -1
- package/dist/utils/projects.d.ts +23 -0
- package/dist/utils/projects.d.ts.map +1 -0
- package/dist/utils/projects.js +36 -0
- package/dist/utils/projects.js.map +1 -0
- package/dist/utils/requirements.d.ts +15 -0
- package/dist/utils/requirements.d.ts.map +1 -1
- package/dist/utils/requirements.js +32 -7
- package/dist/utils/requirements.js.map +1 -1
- package/dist/utils/tasks.d.ts +12 -0
- package/dist/utils/tasks.d.ts.map +1 -1
- package/dist/utils/tasks.js +31 -6
- package/dist/utils/tasks.js.map +1 -1
- package/dist/utils/workspace-manager.d.ts +65 -0
- package/dist/utils/workspace-manager.d.ts.map +1 -0
- package/dist/utils/workspace-manager.js +98 -0
- package/dist/utils/workspace-manager.js.map +1 -0
- package/package.json +4 -1
- package/dist/services/context-manager.d.ts +0 -170
- package/dist/services/context-manager.d.ts.map +0 -1
- package/dist/services/context-manager.js +0 -261
- package/dist/services/context-manager.js.map +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal GitHub Service
|
|
3
|
+
*
|
|
4
|
+
* For internal use only - not exposed as CLI commands.
|
|
5
|
+
* Handles API interactions with BrainGrid v1 GitHub endpoints.
|
|
6
|
+
*
|
|
7
|
+
* This service provides methods to:
|
|
8
|
+
* - List GitHub installations for the authenticated organization
|
|
9
|
+
* - Get detailed information about specific installations
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
import { createAuthenticatedAxios } from '../../utils/axios-with-auth.js';
|
|
14
|
+
/**
|
|
15
|
+
* Internal service for GitHub API operations
|
|
16
|
+
*/
|
|
17
|
+
export class GitHubService {
|
|
18
|
+
constructor(baseUrl, auth) {
|
|
19
|
+
this.baseUrl = baseUrl;
|
|
20
|
+
this.auth = auth;
|
|
21
|
+
this.axios = createAuthenticatedAxios(auth);
|
|
22
|
+
}
|
|
23
|
+
getHeaders() {
|
|
24
|
+
return {
|
|
25
|
+
'Content-Type': 'application/json',
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* List GitHub installations for the authenticated organization
|
|
30
|
+
*
|
|
31
|
+
* @param params - Optional pagination parameters
|
|
32
|
+
* @param params.page - Page number (default: 1, min: 1)
|
|
33
|
+
* @param params.limit - Number of installations per page (default: 20, min: 1, max: 100)
|
|
34
|
+
* @returns List of GitHub installations with pagination
|
|
35
|
+
* @throws {Error} On API errors (401, 404, 422, 500)
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const result = await githubService.listInstallations({ page: 1, limit: 20 });
|
|
40
|
+
* console.log(result.installations);
|
|
41
|
+
* console.log(result.pagination);
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
async listInstallations(params) {
|
|
45
|
+
const url = `${this.baseUrl}/api/v1/github/installations`;
|
|
46
|
+
const headers = this.getHeaders();
|
|
47
|
+
const response = await this.axios.get(url, {
|
|
48
|
+
headers,
|
|
49
|
+
params,
|
|
50
|
+
});
|
|
51
|
+
return response.data;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get detailed information about a specific GitHub installation
|
|
55
|
+
*
|
|
56
|
+
* Supports both UUID and short ID formats (e.g., "GITHUB-1").
|
|
57
|
+
* Returns installation details including all associated repositories.
|
|
58
|
+
*
|
|
59
|
+
* @param installationId - Installation UUID or short ID (e.g., "GITHUB-1")
|
|
60
|
+
* @returns Detailed installation information with repositories
|
|
61
|
+
* @throws {Error} On API errors (401, 404, 422, 500)
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* // Using short ID
|
|
66
|
+
* const installation = await githubService.getInstallation('GITHUB-1');
|
|
67
|
+
*
|
|
68
|
+
* // Using UUID
|
|
69
|
+
* const installation = await githubService.getInstallation('550e8400-e29b-41d4-a716-446655440000');
|
|
70
|
+
*
|
|
71
|
+
* console.log(installation.repositories);
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
async getInstallation(installationId) {
|
|
75
|
+
const url = `${this.baseUrl}/api/v1/github/installations/${installationId}`;
|
|
76
|
+
const headers = this.getHeaders();
|
|
77
|
+
const response = await this.axios.get(url, { headers });
|
|
78
|
+
return response.data;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=github-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-service.js","sourceRoot":"","sources":["../../../src/services/internal/github-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAG1E;;GAEG;AACH,MAAM,OAAO,aAAa;IAKzB,YAAY,OAAe,EAAE,IAAmB;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAEO,UAAU;QACjB,OAAO;YACN,cAAc,EAAE,kBAAkB;SAClC,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,iBAAiB,CAAC,MAGvB;QACA,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,8BAA8B,CAAC;QAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAElC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAkC,GAAG,EAAE;YAC3E,OAAO;YACP,MAAM;SACN,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,CAAC,eAAe,CAAC,cAAsB;QAC3C,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,gCAAgC,cAAc,EAAE,CAAC;QAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAElC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAA2B,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QAClF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;CACD"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal Repository Service
|
|
3
|
+
*
|
|
4
|
+
* For internal use only - not exposed as CLI commands.
|
|
5
|
+
* Handles API interactions with BrainGrid v1 Repository endpoints.
|
|
6
|
+
*
|
|
7
|
+
* This service provides methods to:
|
|
8
|
+
* - List repositories with filtering and pagination
|
|
9
|
+
* - Get detailed information about specific repositories
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
import { BraingridAuth } from '../auth.js';
|
|
14
|
+
import { Repository, ListRepositoriesResponse } from '../../types/github.js';
|
|
15
|
+
/**
|
|
16
|
+
* Internal service for Repository API operations
|
|
17
|
+
*/
|
|
18
|
+
export declare class RepositoryService {
|
|
19
|
+
private baseUrl;
|
|
20
|
+
private auth;
|
|
21
|
+
private axios;
|
|
22
|
+
constructor(baseUrl: string, auth: BraingridAuth);
|
|
23
|
+
private getHeaders;
|
|
24
|
+
/**
|
|
25
|
+
* List repositories for the authenticated organization
|
|
26
|
+
*
|
|
27
|
+
* @param params - Optional filtering and pagination parameters
|
|
28
|
+
* @param params.page - Page number (default: 1, min: 1)
|
|
29
|
+
* @param params.limit - Number of repositories per page (default: 10, min: 1, max: 100)
|
|
30
|
+
* @param params.owner - Filter repositories by owner name
|
|
31
|
+
* @param params.name - Filter repositories by name (requires owner parameter)
|
|
32
|
+
* @returns List of repositories with pagination
|
|
33
|
+
* @throws {Error} On API errors (401, 404, 422, 500)
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* // List all repositories with pagination
|
|
38
|
+
* const result = await repositoryService.listRepositories({ page: 1, limit: 10 });
|
|
39
|
+
* console.log(result.repositories);
|
|
40
|
+
* console.log(result.pagination);
|
|
41
|
+
*
|
|
42
|
+
* // Filter by owner
|
|
43
|
+
* const microsoftRepos = await repositoryService.listRepositories({ owner: 'microsoft' });
|
|
44
|
+
*
|
|
45
|
+
* // Filter by owner and name
|
|
46
|
+
* const tsRepo = await repositoryService.listRepositories({ owner: 'microsoft', name: 'typescript' });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
listRepositories(params?: {
|
|
50
|
+
page?: number;
|
|
51
|
+
limit?: number;
|
|
52
|
+
owner?: string;
|
|
53
|
+
name?: string;
|
|
54
|
+
}): Promise<ListRepositoriesResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Get detailed information about a specific repository
|
|
57
|
+
*
|
|
58
|
+
* Supports both UUID and short ID formats (e.g., "REPO-1").
|
|
59
|
+
* Returns repository details including metadata and sync status.
|
|
60
|
+
*
|
|
61
|
+
* @param repositoryId - Repository UUID or short ID (e.g., "REPO-1")
|
|
62
|
+
* @returns Detailed repository information
|
|
63
|
+
* @throws {Error} On API errors (401, 404, 422, 500)
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```typescript
|
|
67
|
+
* // Using short ID
|
|
68
|
+
* const repo = await repositoryService.getRepository('REPO-1');
|
|
69
|
+
*
|
|
70
|
+
* // Using UUID
|
|
71
|
+
* const repo = await repositoryService.getRepository('550e8400-e29b-41d4-a716-446655440000');
|
|
72
|
+
*
|
|
73
|
+
* console.log(repo.full_name);
|
|
74
|
+
* console.log(repo.last_synced_at);
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
getRepository(repositoryId: string): Promise<Repository>;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=repository-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository-service.d.ts","sourceRoot":"","sources":["../../../src/services/internal/repository-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAE7E;;GAEG;AACH,qBAAa,iBAAiB;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,IAAI,CAAgB;IAC5B,OAAO,CAAC,KAAK,CAAgB;gBAEjB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa;IAMhD,OAAO,CAAC,UAAU;IAMlB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,gBAAgB,CAAC,MAAM,CAAC,EAAE;QAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAQrC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;CAO9D"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal Repository Service
|
|
3
|
+
*
|
|
4
|
+
* For internal use only - not exposed as CLI commands.
|
|
5
|
+
* Handles API interactions with BrainGrid v1 Repository endpoints.
|
|
6
|
+
*
|
|
7
|
+
* This service provides methods to:
|
|
8
|
+
* - List repositories with filtering and pagination
|
|
9
|
+
* - Get detailed information about specific repositories
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
import { createAuthenticatedAxios } from '../../utils/axios-with-auth.js';
|
|
14
|
+
/**
|
|
15
|
+
* Internal service for Repository API operations
|
|
16
|
+
*/
|
|
17
|
+
export class RepositoryService {
|
|
18
|
+
constructor(baseUrl, auth) {
|
|
19
|
+
this.baseUrl = baseUrl;
|
|
20
|
+
this.auth = auth;
|
|
21
|
+
this.axios = createAuthenticatedAxios(auth);
|
|
22
|
+
}
|
|
23
|
+
getHeaders() {
|
|
24
|
+
return {
|
|
25
|
+
'Content-Type': 'application/json',
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* List repositories for the authenticated organization
|
|
30
|
+
*
|
|
31
|
+
* @param params - Optional filtering and pagination parameters
|
|
32
|
+
* @param params.page - Page number (default: 1, min: 1)
|
|
33
|
+
* @param params.limit - Number of repositories per page (default: 10, min: 1, max: 100)
|
|
34
|
+
* @param params.owner - Filter repositories by owner name
|
|
35
|
+
* @param params.name - Filter repositories by name (requires owner parameter)
|
|
36
|
+
* @returns List of repositories with pagination
|
|
37
|
+
* @throws {Error} On API errors (401, 404, 422, 500)
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* // List all repositories with pagination
|
|
42
|
+
* const result = await repositoryService.listRepositories({ page: 1, limit: 10 });
|
|
43
|
+
* console.log(result.repositories);
|
|
44
|
+
* console.log(result.pagination);
|
|
45
|
+
*
|
|
46
|
+
* // Filter by owner
|
|
47
|
+
* const microsoftRepos = await repositoryService.listRepositories({ owner: 'microsoft' });
|
|
48
|
+
*
|
|
49
|
+
* // Filter by owner and name
|
|
50
|
+
* const tsRepo = await repositoryService.listRepositories({ owner: 'microsoft', name: 'typescript' });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
async listRepositories(params) {
|
|
54
|
+
const url = `${this.baseUrl}/api/v1/repositories`;
|
|
55
|
+
const headers = this.getHeaders();
|
|
56
|
+
const response = await this.axios.get(url, { headers, params });
|
|
57
|
+
return response.data;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get detailed information about a specific repository
|
|
61
|
+
*
|
|
62
|
+
* Supports both UUID and short ID formats (e.g., "REPO-1").
|
|
63
|
+
* Returns repository details including metadata and sync status.
|
|
64
|
+
*
|
|
65
|
+
* @param repositoryId - Repository UUID or short ID (e.g., "REPO-1")
|
|
66
|
+
* @returns Detailed repository information
|
|
67
|
+
* @throws {Error} On API errors (401, 404, 422, 500)
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* // Using short ID
|
|
72
|
+
* const repo = await repositoryService.getRepository('REPO-1');
|
|
73
|
+
*
|
|
74
|
+
* // Using UUID
|
|
75
|
+
* const repo = await repositoryService.getRepository('550e8400-e29b-41d4-a716-446655440000');
|
|
76
|
+
*
|
|
77
|
+
* console.log(repo.full_name);
|
|
78
|
+
* console.log(repo.last_synced_at);
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
async getRepository(repositoryId) {
|
|
82
|
+
const url = `${this.baseUrl}/api/v1/repositories/${repositoryId}`;
|
|
83
|
+
const headers = this.getHeaders();
|
|
84
|
+
const response = await this.axios.get(url, { headers });
|
|
85
|
+
return response.data;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=repository-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository-service.js","sourceRoot":"","sources":["../../../src/services/internal/repository-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAG1E;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAK7B,YAAY,OAAe,EAAE,IAAmB;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAEO,UAAU;QACjB,OAAO;YACN,cAAc,EAAE,kBAAkB;SAClC,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,gBAAgB,CAAC,MAKtB;QACA,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,sBAAsB,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAElC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAA2B,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC1F,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,KAAK,CAAC,aAAa,CAAC,YAAoB;QACvC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,wBAAwB,YAAY,EAAE,CAAC;QAClE,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAElC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAa,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QACpE,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;CACD"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub API Types
|
|
3
|
+
* Type definitions for BrainGrid v1 GitHub API endpoints
|
|
4
|
+
*/
|
|
5
|
+
import { Pagination } from './api.js';
|
|
6
|
+
/**
|
|
7
|
+
* GitHub repository information
|
|
8
|
+
*/
|
|
9
|
+
export interface GitHubRepository {
|
|
10
|
+
/** Repository UUID */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Full repository name (owner/repo) */
|
|
13
|
+
full_name: string;
|
|
14
|
+
/** Whether the repository is private */
|
|
15
|
+
private: boolean;
|
|
16
|
+
/** Default branch name */
|
|
17
|
+
default_branch: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* GitHub installation summary
|
|
21
|
+
*/
|
|
22
|
+
export interface GitHubInstallation {
|
|
23
|
+
/** Internal installation UUID */
|
|
24
|
+
id: string;
|
|
25
|
+
/** Human-readable installation identifier (e.g., GITHUB-1) */
|
|
26
|
+
short_id: string;
|
|
27
|
+
/** GitHub installation ID from GitHub */
|
|
28
|
+
installation_id: string;
|
|
29
|
+
/** GitHub account name */
|
|
30
|
+
account_name: string;
|
|
31
|
+
/** GitHub account type */
|
|
32
|
+
account_type: 'Organization' | 'User';
|
|
33
|
+
/** GitHub account avatar URL */
|
|
34
|
+
account_avatar_url: string | null;
|
|
35
|
+
/** Installation creation timestamp (ISO 8601) */
|
|
36
|
+
installed_at: string;
|
|
37
|
+
/** Installation last update timestamp (ISO 8601) */
|
|
38
|
+
updated_at: string;
|
|
39
|
+
/** Installation status */
|
|
40
|
+
status: 'ACTIVE' | 'SUSPENDED' | 'DELETED';
|
|
41
|
+
/** Associated BrainGrid organization */
|
|
42
|
+
organization: {
|
|
43
|
+
/** BrainGrid organization UUID */
|
|
44
|
+
id: string;
|
|
45
|
+
/** BrainGrid organization name */
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
/** Number of repositories in this installation */
|
|
49
|
+
repository_count: number;
|
|
50
|
+
/** GitHub installation permissions */
|
|
51
|
+
permissions: Record<string, string>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Detailed GitHub installation with repositories
|
|
55
|
+
*/
|
|
56
|
+
export interface GitHubInstallationDetail extends GitHubInstallation {
|
|
57
|
+
/** Repositories in this installation */
|
|
58
|
+
repositories: GitHubRepository[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Response for listing GitHub installations
|
|
62
|
+
*/
|
|
63
|
+
export interface ListGitHubInstallationsResponse {
|
|
64
|
+
/** Array of GitHub installations */
|
|
65
|
+
installations: GitHubInstallation[];
|
|
66
|
+
/** Pagination information */
|
|
67
|
+
pagination: Pagination;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Repository information from BrainGrid
|
|
71
|
+
*/
|
|
72
|
+
export interface Repository {
|
|
73
|
+
/** Repository UUID */
|
|
74
|
+
id: string;
|
|
75
|
+
/** Human-readable repository identifier (e.g., REPO-1) */
|
|
76
|
+
short_id: string | null;
|
|
77
|
+
/** Repository name */
|
|
78
|
+
name: string;
|
|
79
|
+
/** Full repository name (owner/repo) */
|
|
80
|
+
full_name: string;
|
|
81
|
+
/** Whether the repository is private */
|
|
82
|
+
private: boolean;
|
|
83
|
+
/** Repository description */
|
|
84
|
+
description: string | null;
|
|
85
|
+
/** GitHub repository URL */
|
|
86
|
+
html_url: string;
|
|
87
|
+
/** Default branch name */
|
|
88
|
+
default_branch: string;
|
|
89
|
+
/** Repository creation timestamp (ISO 8601) */
|
|
90
|
+
created_at: string;
|
|
91
|
+
/** Repository last update timestamp (ISO 8601) */
|
|
92
|
+
updated_at: string;
|
|
93
|
+
/** Last sync timestamp with GitHub (ISO 8601) */
|
|
94
|
+
last_synced_at: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Response for listing repositories
|
|
98
|
+
*/
|
|
99
|
+
export interface ListRepositoriesResponse {
|
|
100
|
+
/** Array of repositories */
|
|
101
|
+
repositories: Repository[];
|
|
102
|
+
/** Pagination information */
|
|
103
|
+
pagination: Pagination;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=github.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/types/github.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,0BAA0B;IAC1B,cAAc,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,0BAA0B;IAC1B,YAAY,EAAE,cAAc,GAAG,MAAM,CAAC;IACtC,gCAAgC;IAChC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,MAAM,EAAE,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;IAC3C,wCAAwC;IACxC,YAAY,EAAE;QACb,kCAAkC;QAClC,EAAE,EAAE,MAAM,CAAC;QACX,kCAAkC;QAClC,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF,kDAAkD;IAClD,gBAAgB,EAAE,MAAM,CAAC;IACzB,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IACnE,wCAAwC;IACxC,YAAY,EAAE,gBAAgB,EAAE,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C,oCAAoC;IACpC,aAAa,EAAE,kBAAkB,EAAE,CAAC;IACpC,6BAA6B;IAC7B,UAAU,EAAE,UAAU,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,cAAc,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC,4BAA4B;IAC5B,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,6BAA6B;IAC7B,UAAU,EAAE,UAAU,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.js","sourceRoot":"","sources":["../../src/types/github.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-tools.d.ts","sourceRoot":"","sources":["../../src/utils/cli-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"cli-tools.d.ts","sourceRoot":"","sources":["../../src/utils/cli-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AA6FD;;;GAGG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAYtE;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAoB,EACjC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GACxC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiBxB;AA6CD;;;GAGG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAarE"}
|
package/dist/utils/cli-tools.js
CHANGED
|
@@ -13,7 +13,6 @@ import { homedir } from 'os';
|
|
|
13
13
|
import { join } from 'path';
|
|
14
14
|
const execAsync = promisify(exec);
|
|
15
15
|
// Claude Code local installation path after migrate-installer
|
|
16
|
-
// See: https://github.com/github/spec-kit/issues/123
|
|
17
16
|
const CLAUDE_LOCAL_PATH = join(homedir(), '.claude', 'local', 'claude');
|
|
18
17
|
/**
|
|
19
18
|
* Check if Claude Code is installed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-tools.js","sourceRoot":"","sources":["../../src/utils/cli-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OA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,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACjF,OAAO,OAAO,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACR,+DAA+D;QAC/D,+DAA+D;QAC/D,OAAO,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAC/B,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,SAAS,EAAE,KAAK;SAChB,CAAC,CAAC,CAAC;IACL,CAAC;AACF,CAAC"}
|
package/dist/utils/git.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ export declare function parseGitHubRepo(url: string): GitHubRepo | null;
|
|
|
43
43
|
* Get the current branch name
|
|
44
44
|
*/
|
|
45
45
|
export declare function getCurrentBranch(): Promise<string | null>;
|
|
46
|
+
/**
|
|
47
|
+
* Get the git repository root directory
|
|
48
|
+
* Returns the absolute path to the repository root, or null if not in a git repository
|
|
49
|
+
*/
|
|
50
|
+
export declare function getGitRoot(): Promise<string | null>;
|
|
46
51
|
/**
|
|
47
52
|
* Get git user configuration (name and email)
|
|
48
53
|
*/
|
package/dist/utils/git.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,MAAM,WAAW,WAAW;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,OAAO;IACvB,IAAI,EAAE,MAAM,GA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AM,CAAC;CACb;AAED;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAOxD;AAED;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAO3D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAsB9D;AAED;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAO/D;AAED;;;GAGG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOzD;AAED;;GAEG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,CAmBnD;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAgCxE"}
|
package/dist/utils/git.js
CHANGED
|
@@ -73,6 +73,19 @@ export async function getCurrentBranch() {
|
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Get the git repository root directory
|
|
78
|
+
* Returns the absolute path to the repository root, or null if not in a git repository
|
|
79
|
+
*/
|
|
80
|
+
export async function getGitRoot() {
|
|
81
|
+
try {
|
|
82
|
+
const { stdout } = await execAsync('git rev-parse --show-toplevel');
|
|
83
|
+
return stdout.trim() || null;
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
76
89
|
/**
|
|
77
90
|
* Get git user configuration (name and email)
|
|
78
91
|
*/
|
package/dist/utils/git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,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,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI;QAC1B,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,IAAI;QACxB,MAAM;QACN,QAAQ,EAAE,OAAO,CAAC,IAAI;QACtB,SAAS,EAAE,OAAO,CAAC,KAAK;QACxB,SAAS;KACT,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic ID normalization utility for resource identifiers
|
|
3
|
+
*
|
|
4
|
+
* This module provides a unified approach to normalizing resource IDs
|
|
5
|
+
* (Projects, Requirements, Tasks) from various user input formats.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Normalize a resource ID from various formats to API-compatible format:
|
|
9
|
+
* - "PREFIX-123" -> "PREFIX-123" (already normalized)
|
|
10
|
+
* - "prefix-123" -> "PREFIX-123" (uppercase prefix)
|
|
11
|
+
* - "PREFIX 123" -> "PREFIX-123" (replace space with dash, uppercase)
|
|
12
|
+
* - "prefix 123" -> "PREFIX-123" (replace space with dash, uppercase)
|
|
13
|
+
* - "123" -> "PREFIX-123" (add prefix)
|
|
14
|
+
* - "uuid-string" -> "uuid-string" (UUID, return as-is)
|
|
15
|
+
*
|
|
16
|
+
* @param prefix The resource prefix (e.g., 'PROJ', 'REQ', 'TASK')
|
|
17
|
+
* @param input The user-provided ID string
|
|
18
|
+
* @returns The normalized ID suitable for API calls
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* normalizeId('PROJ', 'proj-123') // Returns 'PROJ-123'
|
|
22
|
+
* normalizeId('REQ', 'REQ 456') // Returns 'REQ-456'
|
|
23
|
+
* normalizeId('TASK', '789') // Returns 'TASK-789'
|
|
24
|
+
*/
|
|
25
|
+
export declare function normalizeId(prefix: string, input: string): string;
|
|
26
|
+
//# sourceMappingURL=id-normalization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id-normalization.d.ts","sourceRoot":"","sources":["../../src/utils/id-normalization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAuBjE"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic ID normalization utility for resource identifiers
|
|
3
|
+
*
|
|
4
|
+
* This module provides a unified approach to normalizing resource IDs
|
|
5
|
+
* (Projects, Requirements, Tasks) from various user input formats.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Normalize a resource ID from various formats to API-compatible format:
|
|
9
|
+
* - "PREFIX-123" -> "PREFIX-123" (already normalized)
|
|
10
|
+
* - "prefix-123" -> "PREFIX-123" (uppercase prefix)
|
|
11
|
+
* - "PREFIX 123" -> "PREFIX-123" (replace space with dash, uppercase)
|
|
12
|
+
* - "prefix 123" -> "PREFIX-123" (replace space with dash, uppercase)
|
|
13
|
+
* - "123" -> "PREFIX-123" (add prefix)
|
|
14
|
+
* - "uuid-string" -> "uuid-string" (UUID, return as-is)
|
|
15
|
+
*
|
|
16
|
+
* @param prefix The resource prefix (e.g., 'PROJ', 'REQ', 'TASK')
|
|
17
|
+
* @param input The user-provided ID string
|
|
18
|
+
* @returns The normalized ID suitable for API calls
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* normalizeId('PROJ', 'proj-123') // Returns 'PROJ-123'
|
|
22
|
+
* normalizeId('REQ', 'REQ 456') // Returns 'REQ-456'
|
|
23
|
+
* normalizeId('TASK', '789') // Returns 'TASK-789'
|
|
24
|
+
*/
|
|
25
|
+
export function normalizeId(prefix, input) {
|
|
26
|
+
const trimmed = input.trim();
|
|
27
|
+
const upperPrefix = prefix.toUpperCase();
|
|
28
|
+
// Handle "PREFIX-123" or "prefix-123" format (already has dash)
|
|
29
|
+
const dashMatch = trimmed.match(new RegExp(`^${prefix}-(\\d+)$`, 'i'));
|
|
30
|
+
if (dashMatch) {
|
|
31
|
+
return `${upperPrefix}-${dashMatch[1]}`;
|
|
32
|
+
}
|
|
33
|
+
// Handle "PREFIX 123" or "prefix 123" format (space instead of dash)
|
|
34
|
+
const spaceMatch = trimmed.match(new RegExp(`^${prefix}\\s+(\\d+)$`, 'i'));
|
|
35
|
+
if (spaceMatch) {
|
|
36
|
+
return `${upperPrefix}-${spaceMatch[1]}`;
|
|
37
|
+
}
|
|
38
|
+
// Handle plain number format "123"
|
|
39
|
+
if (/^\d+$/.test(trimmed)) {
|
|
40
|
+
return `${upperPrefix}-${trimmed}`;
|
|
41
|
+
}
|
|
42
|
+
// Assume it's a UUID - return as-is
|
|
43
|
+
return trimmed;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=id-normalization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id-normalization.js","sourceRoot":"","sources":["../../src/utils/id-normalization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,KAAa;IACxD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IAEzC,gEAAgE;IAChE,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,MAAM,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC;IACvE,IAAI,SAAS,EAAE,CAAC;QACf,OAAO,GAAG,WAAW,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACzC,CAAC;IAED,qEAAqE;IACrE,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,MAAM,aAAa,EAAE,GAAG,CAAC,CAAC,CAAC;IAC3E,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,GAAG,WAAW,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1C,CAAC;IAED,mCAAmC;IACnC,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,GAAG,WAAW,IAAI,OAAO,EAAE,CAAC;IACpC,CAAC;IAED,oCAAoC;IACpC,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
|
@@ -6,31 +6,31 @@ import { LocalProjectConfig } from '../types/local-project.js';
|
|
|
6
6
|
/**
|
|
7
7
|
* Get the path to the .braingrid directory
|
|
8
8
|
*/
|
|
9
|
-
export declare function getBraingridDir(cwd?: string): string
|
|
9
|
+
export declare function getBraingridDir(cwd?: string): Promise<string>;
|
|
10
10
|
/**
|
|
11
11
|
* Get the path to the project.json file
|
|
12
12
|
*/
|
|
13
|
-
export declare function getProjectConfigPath(cwd?: string): string
|
|
13
|
+
export declare function getProjectConfigPath(cwd?: string): Promise<string>;
|
|
14
14
|
/**
|
|
15
15
|
* Check if .braingrid/project.json exists
|
|
16
16
|
*/
|
|
17
|
-
export declare function projectConfigExists(cwd?: string): boolean
|
|
17
|
+
export declare function projectConfigExists(cwd?: string): Promise<boolean>;
|
|
18
18
|
/**
|
|
19
19
|
* Load project configuration from .braingrid/project.json
|
|
20
20
|
* @throws Error if file doesn't exist or is invalid
|
|
21
21
|
*/
|
|
22
|
-
export declare function loadProjectConfig(cwd?: string): LocalProjectConfig
|
|
22
|
+
export declare function loadProjectConfig(cwd?: string): Promise<LocalProjectConfig>;
|
|
23
23
|
/**
|
|
24
24
|
* Save project configuration to .braingrid/project.json
|
|
25
25
|
*/
|
|
26
|
-
export declare function saveProjectConfig(config: LocalProjectConfig, cwd?: string): void
|
|
26
|
+
export declare function saveProjectConfig(config: LocalProjectConfig, cwd?: string): Promise<void>;
|
|
27
27
|
/**
|
|
28
28
|
* Delete .braingrid/project.json
|
|
29
29
|
*/
|
|
30
|
-
export declare function deleteProjectConfig(cwd?: string): void
|
|
30
|
+
export declare function deleteProjectConfig(cwd?: string): Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* Get the local project ID from .braingrid/project.json
|
|
33
33
|
* Returns the short_id (e.g., PROJ-123) if project.json exists, null otherwise
|
|
34
34
|
*/
|
|
35
|
-
export declare function getLocalProjectId(cwd?: string): string | null
|
|
35
|
+
export declare function getLocalProjectId(cwd?: string): Promise<string | null>;
|
|
36
36
|
//# sourceMappingURL=local-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-store.d.ts","sourceRoot":"","sources":["../../src/utils/local-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAA4B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"local-store.d.ts","sourceRoot":"","sources":["../../src/utils/local-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAA4B,MAAM,2BAA2B,CAAC;AAezF;;GAEG;AACH,wBAAsB,eAAe,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGnE;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGxE;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGxE;AAYD;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAYjF;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO/F;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKrE;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAO5E"}
|