Skip to content

Commit 6e2e0bf

Browse files
skulidropekclaude
andcommitted
Merge main into issue-413: port tilde TARGET_DIR fix into packages/container (#414)
main (#412) extracted the entrypoint templates from packages/lib into the new @prover-coder-ai/docker-git-container package. Conflict resolution: - tilde $HOME -> /home/<sshUser> fix now lives in packages/container/src/core/templates-entrypoint/base.ts (git rename-detected) - its test moved to packages/container/tests/core/templates.test.ts - dropped the deleted dead copy packages/app/src/lib/.../base.ts - reverted stray version-bump artifacts (app/session-sync package.json + CHANGELOG); the changeset drives release versioning. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 parents 75a43f5 + 17b45c4 commit 6e2e0bf

247 files changed

Lines changed: 1264 additions & 23738 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
"@prover-coder-ai/docker-git": patch
3+
"@effect-template/lib": patch
4+
---
5+
6+
Separate the container definition from the panel and the backend (issue #412).
7+
8+
The container definition — the pure layer that renders a project's `Dockerfile`,
9+
`entrypoint.sh` and `docker-compose.yml` from a `TemplateConfig` — has been
10+
extracted from the backend package (`@effect-template/lib`) into a new,
11+
dependency-free leaf package `@prover-coder-ai/docker-git-container`. The backend
12+
now depends on it and re-exports the moved symbols, so its public API is
13+
unchanged.
14+
15+
The panel (`@prover-coder-ai/docker-git`) no longer carries a duplicate copy of
16+
the container/backend logic: the dead `packages/app/src/lib` tree (165 files) and
17+
its now-unused `@lib` / `@effect-template/lib` aliases and dependency were
18+
removed. The `no-lib-imports` ESLint rule now forbids the panel from importing
19+
either the backend or the container-definition package, keeping the boundary
20+
enforced.
21+
22+
No runtime behaviour changes: the generated container files are byte-identical
23+
(guaranteed by the unchanged property-based template test suite, which moved to
24+
the new package).

.github/workflows/check.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
- uses: actions/checkout@v6
2424
- name: Install dependencies
2525
uses: ./.github/actions/setup
26+
- name: Build (container package)
27+
run: bun run --cwd packages/container build
2628
- name: Build (terminal package)
2729
run: bun run --cwd packages/terminal build
2830
- name: Build (docker-git package)
@@ -60,6 +62,8 @@ jobs:
6062
- uses: actions/checkout@v6
6163
- name: Install dependencies
6264
uses: ./.github/actions/setup
65+
- name: Typecheck (container)
66+
run: bun run --cwd packages/container typecheck
6367
- name: Typecheck (terminal)
6468
run: bun run --cwd packages/terminal typecheck
6569
- name: Typecheck (app)
@@ -84,6 +88,8 @@ jobs:
8488
- uses: actions/checkout@v6
8589
- name: Install dependencies
8690
uses: ./.github/actions/setup
91+
- name: Lint (container)
92+
run: bun run --cwd packages/container lint
8793
- name: Lint (terminal)
8894
run: bun run --cwd packages/terminal lint
8995
- name: Lint (app)
@@ -109,6 +115,8 @@ jobs:
109115
- uses: actions/checkout@v6
110116
- name: Install dependencies
111117
uses: ./.github/actions/setup
118+
- name: Test (container)
119+
run: bun run --cwd packages/container test
112120
- name: Test (terminal)
113121
run: bun run --cwd packages/terminal test
114122
- name: Test (app)
@@ -133,6 +141,8 @@ jobs:
133141
- uses: actions/checkout@v6
134142
- name: Install dependencies
135143
uses: ./.github/actions/setup
144+
- name: Lint Effect-TS (container)
145+
run: bun run --cwd packages/container lint:effect
136146
- name: Lint Effect-TS (terminal)
137147
run: bun run --cwd packages/terminal lint:effect
138148
- name: Lint Effect-TS (app)

bun.lock

Lines changed: 49 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"workspaces": [
88
"packages/api",
99
"packages/app",
10+
"packages/container",
1011
"packages/docker-git-session-sync",
1112
"packages/lib",
1213
"packages/terminal"

packages/api/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ RUN set -eu; \
7676
FROM controller-base AS workspace-deps
7777

7878
COPY package.json bun.lock bunfig.toml tsconfig.base.json tsconfig.json ./
79-
RUN mkdir -p packages/api packages/app packages/docker-git-session-sync packages/lib packages/terminal
79+
RUN mkdir -p packages/api packages/app packages/container packages/docker-git-session-sync packages/lib packages/terminal
8080
COPY packages/api/package.json ./packages/api/package.json
8181
COPY packages/app/package.json ./packages/app/package.json
82+
COPY packages/container/package.json ./packages/container/package.json
8283
COPY packages/docker-git-session-sync/package.json ./packages/docker-git-session-sync/package.json
8384
COPY packages/lib/package.json ./packages/lib/package.json
8485
COPY packages/terminal/package.json ./packages/terminal/package.json
@@ -90,6 +91,7 @@ RUN set -eu; \
9091
--silent \
9192
--filter @effect-template/api \
9293
--filter @effect-template/lib \
94+
--filter @prover-coder-ai/docker-git-container \
9395
--filter @prover-coder-ai/docker-git-terminal \
9496
--filter @prover-coder-ai/docker-git-session-sync; then \
9597
exit 0; \
@@ -105,12 +107,14 @@ FROM workspace-deps AS workspace-static
105107

106108
COPY patches ./patches
107109
COPY scripts ./scripts
110+
COPY packages/container ./packages/container
108111
COPY packages/docker-git-session-sync ./packages/docker-git-session-sync
109112
COPY packages/lib ./packages/lib
110113
COPY packages/terminal ./packages/terminal
111114

112115
RUN bun run --cwd packages/docker-git-session-sync build
113116
RUN bun run --cwd packages/terminal build
117+
RUN bun run --cwd packages/container build
114118
RUN bun run --cwd packages/lib build
115119

116120
FROM controller-base AS skiller-build

packages/api/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
"type": "module",
88
"packageManager": "bun@1.3.11",
99
"scripts": {
10-
"prebuild": "bun run --cwd ../terminal build && bun run --cwd ../lib build",
10+
"prebuild": "bun run --cwd ../terminal build && bun run --cwd ../container build && bun run --cwd ../lib build",
1111
"build": "tsc -p tsconfig.json",
1212
"dev": "tsc -p tsconfig.json --watch",
1313
"prestart": "bun run build",
1414
"start": "bun dist/src/main.js",
15-
"pretypecheck": "bun run --cwd ../terminal build && bun run --cwd ../lib build",
15+
"pretypecheck": "bun run --cwd ../terminal build && bun run --cwd ../container build && bun run --cwd ../lib build",
1616
"typecheck": "tsc --noEmit -p tsconfig.json",
1717
"lint": "eslint .",
18-
"pretest": "bun run --cwd ../terminal build && bun run --cwd ../lib build",
18+
"pretest": "bun run --cwd ../terminal build && bun run --cwd ../container build && bun run --cwd ../lib build",
1919
"test": "vitest run"
2020
},
2121
"dependencies": {

packages/app/CHANGELOG.md

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

3-
## 1.3.5
4-
5-
### Patch Changes
6-
7-
- chore: automated version bump
8-
9-
- Updated dependencies []:
10-
- @prover-coder-ai/docker-git-session-sync@1.0.63
11-
123
## 1.3.4
134

145
### Patch Changes

packages/app/eslint/no-lib-imports.mjs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// @ts-check
22

3-
const bannedPackageName = "@effect-template/lib"
3+
// CHANGE: forbid the panel from importing BOTH the backend and the container-definition packages (issue #412)
4+
// WHY: packages/app is the panel; container orchestration lives in @effect-template/lib (backend) and
5+
// container definition in @prover-coder-ai/docker-git-container. The panel must reach them only via the API client.
6+
// REF: issue-412
7+
const bannedPackageNames = ["@effect-template/lib", "@prover-coder-ai/docker-git-container"]
48
const bannedLocalAlias = "@lib"
59

610
/** @param {string} value */
@@ -38,7 +42,7 @@ const isFrontendSurfaceFile = (filePath) => {
3842

3943
/** @param {string} value */
4044
const isDirectLibImport = (value) =>
41-
value === bannedPackageName || value.startsWith(`${bannedPackageName}/`)
45+
bannedPackageNames.some((name) => value === name || value.startsWith(`${name}/`))
4246

4347
/**
4448
* @param {unknown} value
@@ -198,12 +202,12 @@ export const noLibImportsRule = {
198202
type: "problem",
199203
docs: {
200204
description:
201-
"forbid direct imports, re-exports, and require calls from legacy lib surfaces inside package/app frontend surfaces and tests"
205+
"forbid direct imports, re-exports, and require calls from the backend (@effect-template/lib) or container-definition (@prover-coder-ai/docker-git-container) packages inside package/app frontend surfaces and tests"
202206
},
203207
schema: [],
204208
messages: {
205209
noLibImport:
206-
"Direct import or require '{{source}}' from legacy lib surfaces is forbidden in package/app frontend surfaces and tests. Use the API client or a local app adapter instead."
210+
"Direct import or require '{{source}}' from the backend (@effect-template/lib) or container-definition (@prover-coder-ai/docker-git-container) packages is forbidden in package/app frontend surfaces and tests. Use the API client or a local app adapter instead."
207211
}
208212
},
209213
create: createRuleListener

packages/app/package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@prover-coder-ai/docker-git",
3-
"version": "1.3.5",
3+
"version": "1.3.4",
44
"description": "docker-git Bun and Gridland CLI plus browser frontend",
55
"main": "dist/src/docker-git/main.js",
66
"bin": {
@@ -13,7 +13,7 @@
1313
"doc": "doc"
1414
},
1515
"scripts": {
16-
"prebuild": "bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build && bun run --cwd ../lib build",
16+
"prebuild": "bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build",
1717
"build": "bun run build:app && bun run build:docker-git",
1818
"build:app": "vite build --ssr src/app/main.ts",
1919
"build:web": "vite build --config vite.web.config.ts",
@@ -22,13 +22,13 @@
2222
"dev": "vite build --watch --ssr src/app/main.ts",
2323
"dev:web": "vite --config vite.web.config.ts",
2424
"serve:web": "bun scripts/serve-dist-web.mjs",
25-
"prelint": "bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build && bun run --cwd ../lib build",
25+
"prelint": "bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build",
2626
"lint": "NODE_OPTIONS=--max-old-space-size=4096 PATH=../../scripts:$PATH vibecode-linter src/",
2727
"lint:tests": "NODE_OPTIONS=--max-old-space-size=4096 PATH=../../scripts:$PATH vibecode-linter tests/",
2828
"lint:effect": "NODE_OPTIONS=--max-old-space-size=4096 PATH=../../scripts:$PATH eslint --config eslint.effect-ts-check.config.mjs .",
29-
"prebuild:docker-git": "bun install --cwd ../.. && bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build && bun run --cwd ../lib build",
29+
"prebuild:docker-git": "bun install --cwd ../.. && bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build",
3030
"build:docker-git": "vite build --config vite.docker-git.config.ts",
31-
"prebuild:docker-git:reuse-install": "bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build && bun run --cwd ../lib build",
31+
"prebuild:docker-git:reuse-install": "bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build",
3232
"build:docker-git:reuse-install": "vite build --config vite.docker-git.config.ts",
3333
"check": "bun run typecheck",
3434
"clone": "bun run build:docker-git && bun dist/src/docker-git/main.js clone",
@@ -37,9 +37,9 @@
3737
"list": "bun run build:docker-git && bun dist/src/docker-git/main.js ps",
3838
"preview:web": "vite preview --config vite.web.config.ts",
3939
"start": "bun run build:docker-git && bun dist/src/docker-git/main.js",
40-
"pretest": "bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build && bun run --cwd ../lib build",
40+
"pretest": "bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build",
4141
"test": "bun run lint:tests && vitest run",
42-
"pretypecheck": "bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build && bun run --cwd ../lib build",
42+
"pretypecheck": "bun run --cwd ../docker-git-session-sync build && bun run --cwd ../terminal build",
4343
"typecheck": "tsc --noEmit"
4444
},
4545
"repository": {
@@ -87,7 +87,6 @@
8787
},
8888
"devDependencies": {
8989
"@biomejs/biome": "^2.5.0",
90-
"@effect-template/lib": "workspace:*",
9190
"@effect/eslint-plugin": "^0.3.2",
9291
"@effect/language-service": "latest",
9392
"@effect/vitest": "^0.29.0",

packages/app/src/docker-git/api-terminal-codec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ type RawTerminalSession = {
1717

1818
const isTerminalSessionStatus = (
1919
value: string
20-
): value is ApiTerminalSession["status"] =>
21-
["ready", "attached", "exited", "failed"].includes(value)
20+
): value is ApiTerminalSession["status"] => ["ready", "attached", "exited", "failed"].includes(value)
2221

2322
const readOptionalNumber = (value: JsonValue | undefined): number | undefined =>
2423
typeof value === "number" ? value : undefined

0 commit comments

Comments
 (0)