Skip to content

Commit 60e07fb

Browse files
committed
fix(ci): align lib checks after merge
1 parent 52474c2 commit 60e07fb

8 files changed

Lines changed: 354 additions & 271 deletions

File tree

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
export interface AuthGithubLoginCommand {
2+
readonly _tag: "AuthGithubLogin"
3+
readonly label: string | null
4+
readonly token: string | null
5+
readonly scopes: string | null
6+
readonly envGlobalPath: string
7+
}
8+
9+
export interface AuthGithubStatusCommand {
10+
readonly _tag: "AuthGithubStatus"
11+
readonly envGlobalPath: string
12+
}
13+
14+
export interface AuthGithubLogoutCommand {
15+
readonly _tag: "AuthGithubLogout"
16+
readonly label: string | null
17+
readonly envGlobalPath: string
18+
}
19+
20+
export interface AuthCodexLoginCommand {
21+
readonly _tag: "AuthCodexLogin"
22+
readonly label: string | null
23+
readonly codexAuthPath: string
24+
}
25+
26+
export interface AuthCodexStatusCommand {
27+
readonly _tag: "AuthCodexStatus"
28+
readonly label: string | null
29+
readonly codexAuthPath: string
30+
}
31+
32+
export interface AuthCodexLogoutCommand {
33+
readonly _tag: "AuthCodexLogout"
34+
readonly label: string | null
35+
readonly codexAuthPath: string
36+
}
37+
38+
export interface AuthClaudeLoginCommand {
39+
readonly _tag: "AuthClaudeLogin"
40+
readonly label: string | null
41+
readonly claudeAuthPath: string
42+
}
43+
44+
export interface AuthClaudeStatusCommand {
45+
readonly _tag: "AuthClaudeStatus"
46+
readonly label: string | null
47+
readonly claudeAuthPath: string
48+
}
49+
50+
export interface AuthClaudeLogoutCommand {
51+
readonly _tag: "AuthClaudeLogout"
52+
readonly label: string | null
53+
readonly claudeAuthPath: string
54+
}
55+
56+
// CHANGE: add Gemini CLI auth commands
57+
// WHY: enable Gemini CLI authentication management similar to Claude/Codex
58+
// QUOTE(ТЗ): "Добавь поддержку gemini CLI"
59+
// REF: issue-146
60+
// SOURCE: https://geminicli.com/docs/get-started/authentication/
61+
// FORMAT THEOREM: forall cmd ∈ AuthGeminiCommand: cmd.geminiAuthPath is valid path
62+
// PURITY: CORE
63+
// EFFECT: n/a
64+
// INVARIANT: authentication state is isolated by label
65+
// COMPLEXITY: O(1)
66+
export interface AuthGeminiLoginCommand {
67+
readonly _tag: "AuthGeminiLogin"
68+
readonly label: string | null
69+
readonly geminiAuthPath: string
70+
readonly isWeb: boolean
71+
}
72+
73+
export interface AuthGeminiStatusCommand {
74+
readonly _tag: "AuthGeminiStatus"
75+
readonly label: string | null
76+
readonly geminiAuthPath: string
77+
}
78+
79+
export interface AuthGeminiLogoutCommand {
80+
readonly _tag: "AuthGeminiLogout"
81+
readonly label: string | null
82+
readonly geminiAuthPath: string
83+
}
84+
85+
export type AuthCommand =
86+
| AuthGithubLoginCommand
87+
| AuthGithubStatusCommand
88+
| AuthGithubLogoutCommand
89+
| AuthCodexLoginCommand
90+
| AuthCodexStatusCommand
91+
| AuthCodexLogoutCommand
92+
| AuthClaudeLoginCommand
93+
| AuthClaudeStatusCommand
94+
| AuthClaudeLogoutCommand
95+
| AuthGeminiLoginCommand
96+
| AuthGeminiStatusCommand
97+
| AuthGeminiLogoutCommand

packages/lib/src/core/domain.ts

Lines changed: 43 additions & 199 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,55 @@
1-
import type { SessionGistCommand } from "./session-gist-domain.js"
1+
import type { AuthCommand } from "./auth-domain.js"
2+
import type { SessionsCommand } from "./sessions-domain.js"
3+
import type { StateCommand } from "./state-domain.js"
24

5+
export type {
6+
AuthClaudeLoginCommand,
7+
AuthClaudeLogoutCommand,
8+
AuthClaudeStatusCommand,
9+
AuthCodexLoginCommand,
10+
AuthCodexLogoutCommand,
11+
AuthCodexStatusCommand,
12+
AuthCommand,
13+
AuthGeminiLoginCommand,
14+
AuthGeminiLogoutCommand,
15+
AuthGeminiStatusCommand,
16+
AuthGithubLoginCommand,
17+
AuthGithubLogoutCommand,
18+
AuthGithubStatusCommand
19+
} from "./auth-domain.js"
320
export type { MenuAction, ParseError } from "./menu.js"
421
export { parseMenuSelection } from "./menu.js"
522
export { deriveRepoPathParts, deriveRepoSlug, resolveRepoInput } from "./repo.js"
23+
export type {
24+
SessionsCommand,
25+
SessionsKillCommand,
26+
SessionsListCommand,
27+
SessionsLogsCommand
28+
} from "./sessions-domain.js"
29+
export type {
30+
StateCommand,
31+
StateCommitCommand,
32+
StateInitCommand,
33+
StatePathCommand,
34+
StatePullCommand,
35+
StatePushCommand,
36+
StateStatusCommand,
37+
StateSyncCommand
38+
} from "./state-domain.js"
39+
export {
40+
defaultCpuLimit,
41+
defaultDockerNetworkMode,
42+
defaultDockerSharedNetworkName,
43+
defaultRamLimit,
44+
defaultTemplateConfig,
45+
dockerGitSharedCacheVolumeName,
46+
dockerGitSharedCodexVolumeName
47+
} from "./template-defaults.js"
648

749
export type AgentMode = "claude" | "codex" | "gemini"
850

951
export type DockerNetworkMode = "shared" | "project"
1052

11-
export const defaultDockerNetworkMode: DockerNetworkMode = "shared"
12-
13-
export const defaultDockerSharedNetworkName = "docker-git-shared"
14-
export const dockerGitSharedCacheVolumeName = "docker-git-shared-cache"
15-
export const dockerGitSharedCodexVolumeName = "docker-git-shared-codex"
16-
17-
export const defaultCpuLimit = "30%"
18-
19-
export const defaultRamLimit = "30%"
20-
2153
export interface TemplateConfig {
2254
readonly containerName: string
2355
readonly serviceName: string
@@ -82,25 +114,6 @@ export interface PanesCommand {
82114
readonly projectDir: string
83115
}
84116

85-
export interface SessionsListCommand {
86-
readonly _tag: "SessionsList"
87-
readonly projectDir: string
88-
readonly includeDefault: boolean
89-
}
90-
91-
export interface SessionsKillCommand {
92-
readonly _tag: "SessionsKill"
93-
readonly projectDir: string
94-
readonly pid: number
95-
}
96-
97-
export interface SessionsLogsCommand {
98-
readonly _tag: "SessionsLogs"
99-
readonly projectDir: string
100-
readonly pid: number
101-
readonly lines: number
102-
}
103-
104117
// CHANGE: remove scrap cache mode and keep only the reproducible session snapshot.
105118
// WHY: cache archives include large, easily-rebuildable artifacts (e.g. node_modules) that should not be stored in git.
106119
// QUOTE(ТЗ): "не должно быть старого режима где он качает весь шлак типо node_modules"
@@ -174,162 +187,18 @@ export interface DownAllCommand {
174187
readonly _tag: "DownAll"
175188
}
176189

177-
export interface StatePathCommand {
178-
readonly _tag: "StatePath"
179-
}
180-
181-
export interface StateInitCommand {
182-
readonly _tag: "StateInit"
183-
readonly repoUrl: string
184-
readonly repoRef: string
185-
}
186-
187-
export interface StatePullCommand {
188-
readonly _tag: "StatePull"
189-
}
190-
191-
export interface StatePushCommand {
192-
readonly _tag: "StatePush"
193-
}
194-
195-
export interface StateStatusCommand {
196-
readonly _tag: "StateStatus"
197-
}
198-
199-
export interface StateCommitCommand {
200-
readonly _tag: "StateCommit"
201-
readonly message: string
202-
}
203-
204-
export interface StateSyncCommand {
205-
readonly _tag: "StateSync"
206-
readonly message: string | null
207-
}
208-
209-
export interface AuthGithubLoginCommand {
210-
readonly _tag: "AuthGithubLogin"
211-
readonly label: string | null
212-
readonly token: string | null
213-
readonly scopes: string | null
214-
readonly envGlobalPath: string
215-
}
216-
217-
export interface AuthGithubStatusCommand {
218-
readonly _tag: "AuthGithubStatus"
219-
readonly envGlobalPath: string
220-
}
221-
222-
export interface AuthGithubLogoutCommand {
223-
readonly _tag: "AuthGithubLogout"
224-
readonly label: string | null
225-
readonly envGlobalPath: string
226-
}
227-
228-
export interface AuthCodexLoginCommand {
229-
readonly _tag: "AuthCodexLogin"
230-
readonly label: string | null
231-
readonly codexAuthPath: string
232-
}
233-
234-
export interface AuthCodexStatusCommand {
235-
readonly _tag: "AuthCodexStatus"
236-
readonly label: string | null
237-
readonly codexAuthPath: string
238-
}
239-
240-
export interface AuthCodexLogoutCommand {
241-
readonly _tag: "AuthCodexLogout"
242-
readonly label: string | null
243-
readonly codexAuthPath: string
244-
}
245-
246-
export interface AuthClaudeLoginCommand {
247-
readonly _tag: "AuthClaudeLogin"
248-
readonly label: string | null
249-
readonly claudeAuthPath: string
250-
}
251-
252-
export interface AuthClaudeStatusCommand {
253-
readonly _tag: "AuthClaudeStatus"
254-
readonly label: string | null
255-
readonly claudeAuthPath: string
256-
}
257-
258-
export interface AuthClaudeLogoutCommand {
259-
readonly _tag: "AuthClaudeLogout"
260-
readonly label: string | null
261-
readonly claudeAuthPath: string
262-
}
263-
264-
// CHANGE: add Gemini CLI auth commands
265-
// WHY: enable Gemini CLI authentication management similar to Claude/Codex
266-
// QUOTE(ТЗ): "Добавь поддержку gemini CLI"
267-
// REF: issue-146
268-
// SOURCE: https://geminicli.com/docs/get-started/authentication/
269-
// FORMAT THEOREM: forall cmd ∈ AuthGeminiCommand: cmd.geminiAuthPath is valid path
270-
// PURITY: CORE
271-
// EFFECT: n/a
272-
// INVARIANT: authentication state is isolated by label
273-
// COMPLEXITY: O(1)
274-
export interface AuthGeminiLoginCommand {
275-
readonly _tag: "AuthGeminiLogin"
276-
readonly label: string | null
277-
readonly geminiAuthPath: string
278-
readonly isWeb: boolean
279-
}
280-
281-
export interface AuthGeminiStatusCommand {
282-
readonly _tag: "AuthGeminiStatus"
283-
readonly label: string | null
284-
readonly geminiAuthPath: string
285-
}
286-
287-
export interface AuthGeminiLogoutCommand {
288-
readonly _tag: "AuthGeminiLogout"
289-
readonly label: string | null
290-
readonly geminiAuthPath: string
291-
}
292-
293190
export type {
294191
SessionGistBackupCommand,
295192
SessionGistCommand,
296193
SessionGistDownloadCommand,
297194
SessionGistListCommand,
298195
SessionGistViewCommand
299196
} from "./session-gist-domain.js"
300-
export type SessionsCommand =
301-
| SessionsListCommand
302-
| SessionsKillCommand
303-
| SessionsLogsCommand
304-
| SessionGistCommand
305197

306198
export type ScrapCommand =
307199
| ScrapExportCommand
308200
| ScrapImportCommand
309201

310-
export type AuthCommand =
311-
| AuthGithubLoginCommand
312-
| AuthGithubStatusCommand
313-
| AuthGithubLogoutCommand
314-
| AuthCodexLoginCommand
315-
| AuthCodexStatusCommand
316-
| AuthCodexLogoutCommand
317-
| AuthClaudeLoginCommand
318-
| AuthClaudeStatusCommand
319-
| AuthClaudeLogoutCommand
320-
| AuthGeminiLoginCommand
321-
| AuthGeminiStatusCommand
322-
| AuthGeminiLogoutCommand
323-
324-
export type StateCommand =
325-
| StatePathCommand
326-
| StateInitCommand
327-
| StatePullCommand
328-
| StatePushCommand
329-
| StateStatusCommand
330-
| StateCommitCommand
331-
| StateSyncCommand
332-
333202
export type Command =
334203
| CreateCommand
335204
| MenuCommand
@@ -389,28 +258,3 @@ export const resolveComposeNetworkName = (
389258
export const resolveProjectBootstrapVolumeName = (
390259
config: Pick<TemplateConfig, "volumeName">
391260
): string => `${config.volumeName}-bootstrap`
392-
393-
export const defaultTemplateConfig = {
394-
containerName: "dev-ssh",
395-
serviceName: "dev",
396-
sshUser: "dev",
397-
sshPort: 2222,
398-
repoRef: "main",
399-
targetDir: "/home/dev/app",
400-
volumeName: "dev_home",
401-
dockerGitPath: "./.docker-git",
402-
authorizedKeysPath: "./.docker-git/authorized_keys",
403-
envGlobalPath: "./.docker-git/.orch/env/global.env",
404-
envProjectPath: "./.orch/env/project.env",
405-
codexAuthPath: "./.docker-git/.orch/auth/codex",
406-
codexSharedAuthPath: "./.docker-git/.orch/auth/codex",
407-
codexHome: "/home/dev/.codex",
408-
geminiAuthPath: "./.docker-git/.orch/auth/gemini",
409-
geminiHome: "/home/dev/.gemini",
410-
cpuLimit: defaultCpuLimit,
411-
ramLimit: defaultRamLimit,
412-
dockerNetworkMode: defaultDockerNetworkMode,
413-
dockerSharedNetworkName: defaultDockerSharedNetworkName,
414-
enableMcpPlaywright: false,
415-
pnpmVersion: "10.27.0"
416-
}

0 commit comments

Comments
 (0)