Skip to content

Commit 52474c2

Browse files
committed
Merge upstream/main into issue-132
2 parents f0f5daf + b689d34 commit 52474c2

66 files changed

Lines changed: 2920 additions & 333 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.githooks/pre-commit

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@ node scripts/split-knowledge-large-files.js
99
while IFS= read -r -d '' knowledge_dir; do
1010
git add -A -- "$knowledge_dir"
1111
done < <(
12-
find . -type d \
13-
\( -name ".knowledge" -o -name ".knowlenge" \) \
14-
-not -path "*/.git/*" \
15-
-print0
12+
find . \
13+
\( -name ".git" -o -name "tmp" \) -type d -prune -o \
14+
\( -type d \( -name ".knowledge" -o -name ".knowlenge" \) -print0 \)
1615
)
1716

17+
# CHANGE: auto-stage AI agent config directories (.gemini, .claude, .codex)
18+
# WHY: ensures AI session context is always included in commits without manual git add
19+
# REF: issue-170
20+
for ai_dir in .gemini .claude .codex; do
21+
if [ -d "$ai_dir" ]; then
22+
git add -A -- "$ai_dir"
23+
fi
24+
done
25+
1826
MAX_BYTES=$((99 * 1000 * 1000))
1927
too_large=()
2028

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ yarn-error.log*
2323
pnpm-debug.log*
2424
reports/
2525
.idea
26-
.claude
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Test that the pre-commit hook logic correctly stages AI config directories
5+
echo "=== Testing AI directory auto-staging logic ==="
6+
7+
REPO_ROOT="$(git rev-parse --show-toplevel)"
8+
cd "$REPO_ROOT"
9+
10+
# Create test AI directories with test files
11+
for ai_dir in .gemini .claude .codex; do
12+
mkdir -p "$ai_dir"
13+
echo "test-content-$(date +%s)" > "$ai_dir/test-file.txt"
14+
done
15+
16+
echo "Created test files:"
17+
ls -la .gemini/test-file.txt .claude/test-file.txt .codex/test-file.txt
18+
19+
# Check gitignore status
20+
echo ""
21+
echo "=== Checking gitignore status ==="
22+
for ai_dir in .gemini .claude .codex; do
23+
if git check-ignore -q "$ai_dir/test-file.txt" 2>/dev/null; then
24+
echo "IGNORED: $ai_dir (this is a problem!)"
25+
else
26+
echo "NOT IGNORED: $ai_dir (good - can be tracked)"
27+
fi
28+
done
29+
30+
# Simulate the auto-staging logic from the pre-commit hook
31+
echo ""
32+
echo "=== Simulating auto-staging ==="
33+
for ai_dir in .gemini .claude .codex; do
34+
if [ -d "$ai_dir" ]; then
35+
git add -A -- "$ai_dir"
36+
echo "Staged: $ai_dir"
37+
fi
38+
done
39+
40+
echo ""
41+
echo "=== Staged files ==="
42+
git diff --cached --name-only | grep -E "^\.(gemini|claude|codex)/" || echo "(none found)"
43+
44+
# Clean up - unstage the test files
45+
git reset HEAD -- .gemini .claude .codex 2>/dev/null || true
46+
rm -rf .gemini/test-file.txt .claude/test-file.txt .codex/test-file.txt
47+
48+
echo ""
49+
echo "=== Test complete ==="

packages/api/src/api/contracts.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export type ProjectDetails = ProjectSummary & {
2525
readonly envProjectPath: string
2626
readonly codexAuthPath: string
2727
readonly codexHome: string
28+
readonly clonedOnHostname?: string | undefined
2829
}
2930

3031
export type CreateProjectRequest = {

packages/api/src/services/projects.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ const toProjectDetails = (
121121
envGlobalPath: project.envGlobalPath,
122122
envProjectPath: project.envProjectPath,
123123
codexAuthPath: project.codexAuthPath,
124-
codexHome: project.codexHome
124+
codexHome: project.codexHome,
125+
clonedOnHostname: project.clonedOnHostname
125126
})
126127

127128
const findProjectById = (projectId: string) =>

packages/app/CHANGELOG.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,83 @@
11
# @prover-coder-ai/docker-git
22

3+
## 1.0.73
4+
5+
### Patch Changes
6+
7+
- chore: automated version bump
8+
9+
## 1.0.72
10+
11+
### Patch Changes
12+
13+
- chore: automated version bump
14+
15+
## 1.0.71
16+
17+
### Patch Changes
18+
19+
- chore: automated version bump
20+
21+
## 1.0.70
22+
23+
### Patch Changes
24+
25+
- chore: automated version bump
26+
27+
## 1.0.69
28+
29+
### Patch Changes
30+
31+
- chore: automated version bump
32+
33+
## 1.0.68
34+
35+
### Patch Changes
36+
37+
- chore: automated version bump
38+
39+
## 1.0.67
40+
41+
### Patch Changes
42+
43+
- chore: automated version bump
44+
45+
## 1.0.66
46+
47+
### Patch Changes
48+
49+
- chore: automated version bump
50+
51+
## 1.0.65
52+
53+
### Patch Changes
54+
55+
- chore: automated version bump
56+
57+
## 1.0.64
58+
59+
### Patch Changes
60+
61+
- chore: automated version bump
62+
63+
## 1.0.63
64+
65+
### Patch Changes
66+
67+
- chore: automated version bump
68+
69+
## 1.0.62
70+
71+
### Patch Changes
72+
73+
- chore: automated version bump
74+
75+
## 1.0.61
76+
77+
### Patch Changes
78+
79+
- chore: automated version bump
80+
381
## 1.0.60
482

583
### Patch Changes

packages/app/eslint.effect-ts-check.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ const restrictedSyntaxBaseNoServiceFactory = [
134134
]
135135

136136
export default tseslint.config(
137+
{
138+
name: "effect-ts-compliance-ignore-shell-tests",
139+
ignores: ["tests/hooks/**"]
140+
},
137141
{
138142
name: "effect-ts-compliance-check",
139143
files: ["src/**/*.ts", "scripts/**/*.ts", "tests/**/*.ts"],

packages/app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@prover-coder-ai/docker-git",
3-
"version": "1.0.60",
3+
"version": "1.0.73",
44
"description": "Minimal Vite-powered TypeScript console starter using Effect",
55
"main": "dist/src/docker-git/main.js",
66
"bin": {
@@ -101,7 +101,7 @@
101101
"eslint-plugin-sonarjs": "^4.0.2",
102102
"eslint-plugin-sort-destructure-keys": "^3.0.0",
103103
"eslint-plugin-unicorn": "^63.0.0",
104-
"@vitest/eslint-plugin": "^1.6.12",
104+
"@vitest/eslint-plugin": "^1.6.13",
105105
"@types/react": "^19.2.14",
106106
"biome": "npm:@biomejs/biome@^2.4.8",
107107
"globals": "^17.4.0",

packages/app/src/docker-git/cli/parser.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ const menuCommand: Command = { _tag: "Menu" }
2323
const statusCommand: Command = { _tag: "Status" }
2424
const downAllCommand: Command = { _tag: "DownAll" }
2525

26+
// CHANGE: parse --active flag for apply-all command to restrict to running containers
27+
// WHY: allow users to apply config only to currently active containers via --active flag
28+
// QUOTE(ТЗ): "сделать это возможным через атрибут --active применять только к активным контейнерам, а не ко всем"
29+
// REF: issue-185
30+
// PURITY: CORE
31+
// EFFECT: n/a
32+
// INVARIANT: activeOnly is true only when --active flag is present
33+
// COMPLEXITY: O(n) where n = |args|
34+
const parseApplyAll = (args: ReadonlyArray<string>): Either.Either<Command, ParseError> => {
35+
const activeOnly = args.includes("--active")
36+
const command: Command = { _tag: "ApplyAll", activeOnly }
37+
return Either.right(command)
38+
}
39+
2640
const parseCreate = (args: ReadonlyArray<string>): Either.Either<Command, ParseError> =>
2741
Either.flatMap(parseRawOptions(args), (raw) => buildCreateCommand(raw))
2842

@@ -75,6 +89,8 @@ export const parseArgs = (args: ReadonlyArray<string>): Either.Either<Command, P
7589
Match.when("ui", () => Either.right(menuCommand))
7690
)
7791
.pipe(
92+
Match.when("apply-all", () => parseApplyAll(rest)),
93+
Match.when("update-all", () => parseApplyAll(rest)),
7894
Match.when("auth", () => parseAuth(rest)),
7995
Match.when("open", () => parseAttach(rest)),
8096
Match.when("apply", () => parseApply(rest)),

packages/app/src/docker-git/cli/usage.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ docker-git session-gists backup [<url>] [options]
1919
docker-git session-gists view <snapshot-ref>
2020
docker-git session-gists download <snapshot-ref> [options]
2121
docker-git ps
22+
docker-git apply-all [--active]
2223
docker-git down-all
2324
docker-git auth <provider> <action> [options]
2425
docker-git state <action> [options]
@@ -36,6 +37,7 @@ Commands:
3637
sessions List/kill/log container terminal processes
3738
session-gists Manage AI session backups via a private session repository (backup/list/view/download)
3839
ps, status Show docker compose status for all docker-git projects
40+
apply-all Apply docker-git config and refresh all containers (docker compose up); use --active to restrict to running containers only
3941
down-all Stop all docker-git containers (docker compose down)
4042
auth Manage GitHub/Codex/Claude Code auth for docker-git
4143
state Manage docker-git state directory via git (sync across machines)
@@ -78,7 +80,8 @@ Options:
7880
--ssh | --no-ssh Auto-open SSH after create/clone (default: clone=--ssh, create=--no-ssh)
7981
--mcp-playwright | --no-mcp-playwright Enable Playwright MCP + Chromium sidecar (default: --no-mcp-playwright)
8082
--auto[=claude|codex] Auto-execute an agent; without value picks by auth, random if both are available
81-
--force Overwrite existing files and wipe compose volumes (docker compose down -v)
83+
--active apply-all: apply only to currently running containers (skip stopped ones)
84+
--force Overwrite existing files, remove conflicting containers, and wipe compose volumes
8285
--force-env Reset project env defaults only (keep workspace volume/data)
8386
-h, --help Show this help
8487

0 commit comments

Comments
 (0)