container-superposition 0.1.5 → 0.1.7
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/README.md +3 -1
- package/dist/scripts/init.js +24 -4
- package/dist/scripts/init.js.map +1 -1
- package/dist/tool/commands/adopt.d.ts +3 -2
- package/dist/tool/commands/adopt.d.ts.map +1 -1
- package/dist/tool/commands/adopt.js +378 -67
- package/dist/tool/commands/adopt.js.map +1 -1
- package/dist/tool/commands/doctor.d.ts +3 -0
- package/dist/tool/commands/doctor.d.ts.map +1 -1
- package/dist/tool/commands/doctor.js +932 -69
- package/dist/tool/commands/doctor.js.map +1 -1
- package/dist/tool/commands/explain.d.ts.map +1 -1
- package/dist/tool/commands/explain.js +9 -0
- package/dist/tool/commands/explain.js.map +1 -1
- package/dist/tool/questionnaire/composer.d.ts.map +1 -1
- package/dist/tool/questionnaire/composer.js +212 -11
- package/dist/tool/questionnaire/composer.js.map +1 -1
- package/dist/tool/schema/overlay-loader.d.ts.map +1 -1
- package/dist/tool/schema/overlay-loader.js +1 -0
- package/dist/tool/schema/overlay-loader.js.map +1 -1
- package/dist/tool/schema/project-config.d.ts +3 -1
- package/dist/tool/schema/project-config.d.ts.map +1 -1
- package/dist/tool/schema/project-config.js +164 -13
- package/dist/tool/schema/project-config.js.map +1 -1
- package/dist/tool/schema/types.d.ts +85 -11
- package/dist/tool/schema/types.d.ts.map +1 -1
- package/dist/tool/utils/merge.d.ts.map +1 -1
- package/dist/tool/utils/merge.js +9 -0
- package/dist/tool/utils/merge.js.map +1 -1
- package/docs/adopt.md +20 -14
- package/docs/creating-overlays.md +151 -2
- package/docs/overlay-imports.md +125 -102
- package/docs/overlays.md +59 -6
- package/docs/quick-reference.md +99 -0
- package/docs/specs/002-superposition-config-file/plan.md +6 -1
- package/docs/specs/002-superposition-config-file/spec.md +6 -0
- package/docs/specs/002-superposition-config-file/tasks.md +2 -0
- package/docs/specs/003-mkdocs2-overlay/spec.md +114 -0
- package/docs/specs/004-doctor-fix/spec.md +70 -0
- package/docs/specs/005-cuda-overlay/spec.md +101 -0
- package/docs/specs/006-rocm-overlay/spec.md +109 -0
- package/docs/team-workflow.md +7 -1
- package/docs/workflows.md +3 -0
- package/features/cross-distro-packages/README.md +18 -0
- package/features/cross-distro-packages/devcontainer-feature.json +3 -3
- package/features/cross-distro-packages/install.sh +49 -7
- package/overlays/.shared/README.md +80 -21
- package/overlays/.shared/compose/common-healthchecks.md +60 -0
- package/overlays/.shared/vscode/recommended-extensions.json +15 -11
- package/overlays/alertmanager/setup.sh +4 -19
- package/overlays/alertmanager/verify.sh +8 -9
- package/overlays/all/README.md +43 -0
- package/overlays/all/devcontainer.patch.json +6 -0
- package/overlays/all/overlay.yml +14 -0
- package/overlays/amp/setup.sh +5 -0
- package/overlays/bun/setup.sh +10 -1
- package/overlays/bun/verify.sh +6 -1
- package/overlays/claude-code/setup.sh +5 -0
- package/overlays/cloudflared/setup.sh +9 -12
- package/overlays/codex/README.md +9 -6
- package/overlays/codex/devcontainer.patch.json +7 -1
- package/overlays/codex/setup.sh +5 -0
- package/overlays/codex/verify.sh +8 -0
- package/overlays/commitlint/setup.sh +5 -0
- package/overlays/cuda/README.md +179 -0
- package/overlays/cuda/devcontainer.patch.json +7 -0
- package/overlays/cuda/overlay.yml +17 -0
- package/overlays/cuda/setup.sh +32 -0
- package/overlays/cuda/verify.sh +38 -0
- package/overlays/devcontainer-cli/README.md +50 -0
- package/overlays/devcontainer-cli/devcontainer.patch.json +13 -0
- package/overlays/devcontainer-cli/overlay.yml +16 -0
- package/overlays/devcontainer-cli/setup.sh +14 -0
- package/overlays/direnv/devcontainer.patch.json +6 -0
- package/overlays/direnv/setup.sh +7 -6
- package/overlays/dotnet/setup.sh +14 -7
- package/overlays/duckdb/devcontainer.patch.json +1 -2
- package/overlays/gcloud/devcontainer.patch.json +0 -6
- package/overlays/gcloud/setup.sh +51 -0
- package/overlays/gemini-cli/setup.sh +5 -0
- package/overlays/git-helpers/devcontainer.patch.json +2 -1
- package/overlays/go/setup.sh +15 -14
- package/overlays/jaeger/overlay.yml +2 -0
- package/overlays/just/setup.sh +5 -17
- package/overlays/keycloak/docker-compose.yml +6 -4
- package/overlays/keycloak/verify.sh +4 -3
- package/overlays/kind/devcontainer.patch.json +1 -2
- package/overlays/kind/setup.sh +8 -17
- package/overlays/minio/setup.sh +10 -18
- package/overlays/mkdocs/overlay.yml +2 -1
- package/overlays/mkdocs2/README.md +135 -0
- package/overlays/mkdocs2/devcontainer.patch.json +19 -0
- package/overlays/mkdocs2/overlay.yml +17 -0
- package/overlays/mkdocs2/setup.sh +67 -0
- package/overlays/mkdocs2/verify.sh +35 -0
- package/overlays/modern-cli-tools/devcontainer.patch.json +7 -1
- package/overlays/modern-cli-tools/setup.sh +21 -71
- package/overlays/mongodb/devcontainer.patch.json +0 -6
- package/overlays/mongodb/setup.sh +59 -0
- package/overlays/mysql/verify.sh +4 -3
- package/overlays/nats/.env.example +1 -1
- package/overlays/nats/README.md +1 -1
- package/overlays/nats/docker-compose.yml +1 -1
- package/overlays/ngrok/setup.sh +9 -6
- package/overlays/nodejs/setup.sh +5 -0
- package/overlays/openapi-tools/devcontainer.patch.json +1 -2
- package/overlays/openapi-tools/setup.sh +9 -8
- package/overlays/opencode/setup.sh +5 -0
- package/overlays/otel-collector/overlay.yml +2 -0
- package/overlays/otel-collector/setup.sh +3 -16
- package/overlays/otel-demo-nodejs/verify.sh +8 -9
- package/overlays/otel-demo-python/verify.sh +16 -10
- package/overlays/pandoc/README.md +286 -0
- package/overlays/pandoc/devcontainer.patch.json +18 -0
- package/overlays/pandoc/overlay.yml +19 -0
- package/overlays/pandoc/setup.sh +293 -0
- package/overlays/pandoc/verify.sh +25 -0
- package/overlays/playwright/devcontainer.patch.json +3 -1
- package/overlays/playwright/setup.sh +37 -0
- package/overlays/postgres/docker-compose.yml +6 -0
- package/overlays/powershell/setup.sh +49 -13
- package/overlays/pre-commit/setup.sh +12 -3
- package/overlays/prometheus/overlay.yml +2 -0
- package/overlays/promtail/verify.sh +16 -10
- package/overlays/pulumi/devcontainer.patch.json +1 -1
- package/overlays/python/setup.sh +28 -9
- package/overlays/python/verify.sh +4 -2
- package/overlays/redpanda/docker-compose.yml +3 -5
- package/overlays/rocm/README.md +227 -0
- package/overlays/rocm/devcontainer.patch.json +4 -0
- package/overlays/rocm/overlay.yml +17 -0
- package/overlays/rocm/setup.sh +45 -0
- package/overlays/rocm/verify.sh +47 -0
- package/overlays/rust/setup.sh +11 -18
- package/overlays/spec-kit/setup.sh +7 -3
- package/overlays/sqlite/setup.sh +14 -14
- package/overlays/sqlserver/docker-compose.yml +3 -3
- package/overlays/sqlserver/verify.sh +22 -5
- package/overlays/tempo/verify.sh +16 -10
- package/overlays/tilt/devcontainer.patch.json +1 -2
- package/overlays/tilt/setup.sh +14 -4
- package/overlays/windsurf-cli/setup.sh +27 -4
- package/overlays/windsurf-cli/verify.sh +13 -3
- package/package.json +2 -1
- package/templates/scripts/setup-utils.sh +228 -0
- package/tool/schema/config.schema.json +110 -8
- package/tool/schema/overlay-manifest.schema.json +5 -0
- package/overlays/.shared/compose/common-healthchecks.yml +0 -38
- /package/overlays/otel-demo-nodejs/{Dockerfile-otel-demo-nodejs → Dockerfile} +0 -0
- /package/overlays/otel-demo-nodejs/{package-otel-demo-nodejs.json → package.json} +0 -0
- /package/overlays/otel-demo-nodejs/{server-otel-demo-nodejs.js → server.js} +0 -0
- /package/overlays/otel-demo-nodejs/{tracing-otel-demo-nodejs.js → tracing.js} +0 -0
- /package/overlays/otel-demo-python/{Dockerfile-otel-demo-python → Dockerfile} +0 -0
- /package/overlays/otel-demo-python/{app-otel-demo-python.py → app.py} +0 -0
- /package/overlays/otel-demo-python/{requirements-otel-demo-python.txt → requirements.txt} +0 -0
|
@@ -1,43 +1,102 @@
|
|
|
1
|
-
# Shared Overlay
|
|
1
|
+
# Shared Overlay Fragments
|
|
2
2
|
|
|
3
|
-
This directory contains
|
|
3
|
+
This directory contains reusable configuration fragments that can be imported by multiple overlays to reduce duplication and ensure consistency.
|
|
4
4
|
|
|
5
5
|
## Structure
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
.shared/
|
|
9
|
-
├── otel/
|
|
10
|
-
├──
|
|
11
|
-
└──
|
|
9
|
+
├── otel/ # OpenTelemetry configurations
|
|
10
|
+
│ ├── instrumentation.env # OTEL SDK env vars for instrumentation
|
|
11
|
+
│ └── otel-base-config.yaml # Base OTEL collector pipeline config
|
|
12
|
+
├── compose/ # Docker Compose patterns
|
|
13
|
+
│ └── common-healthchecks.md # Standard healthcheck patterns (reference — not importable)
|
|
14
|
+
└── vscode/ # VS Code extension sets
|
|
15
|
+
└── recommended-extensions.json # Commonly recommended extensions (devcontainer patch)
|
|
12
16
|
```
|
|
13
17
|
|
|
18
|
+
## Fragment Catalogue
|
|
19
|
+
|
|
20
|
+
### `otel/instrumentation.env`
|
|
21
|
+
|
|
22
|
+
**Purpose:** Common OpenTelemetry SDK environment variables for services that send telemetry to an OTEL collector.
|
|
23
|
+
|
|
24
|
+
**Provides:**
|
|
25
|
+
|
|
26
|
+
- `OTEL_SERVICE_NAME` — service identifier
|
|
27
|
+
- `OTEL_EXPORTER_OTLP_ENDPOINT` — OTLP collector endpoint
|
|
28
|
+
- `OTEL_EXPORTER_OTLP_PROTOCOL` — transport protocol (grpc)
|
|
29
|
+
- `OTEL_RESOURCE_ATTRIBUTES` — deployment metadata
|
|
30
|
+
- `OTEL_TRACES_SAMPLER`, `OTEL_TRACES_EXPORTER` — trace configuration
|
|
31
|
+
- `OTEL_METRICS_EXPORTER`, `OTEL_LOGS_EXPORTER` — metrics and log exporters
|
|
32
|
+
|
|
33
|
+
**Imported by:** `otel-collector`, `prometheus`, `jaeger`
|
|
34
|
+
|
|
35
|
+
**Merge type:** `.env` — appended to `.env.example` with a `# from .shared/otel/instrumentation.env` comment
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### `otel/otel-base-config.yaml`
|
|
40
|
+
|
|
41
|
+
**Purpose:** Base OpenTelemetry Collector receiver and pipeline configuration — OTLP receivers, batch processor, and logging exporter.
|
|
42
|
+
|
|
43
|
+
**Merge type:** `.yaml` — deep-merged into `devcontainer.json` patch
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### `compose/common-healthchecks.md`
|
|
48
|
+
|
|
49
|
+
**Purpose:** Reference library of standard Docker Compose healthcheck patterns for common services (HTTP, PostgreSQL, Redis, MongoDB, MySQL).
|
|
50
|
+
|
|
51
|
+
**Note:** This is a `.md` file (documentation only) — it cannot be imported via `overlay.yml` `imports:`. Copy the relevant pattern directly into your overlay's `docker-compose.yml`.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### `vscode/recommended-extensions.json`
|
|
56
|
+
|
|
57
|
+
**Purpose:** A curated set of VS Code extensions commonly useful across many overlays (spell checking, error lens, GitLens, EditorConfig, Prettier, Docker, YAML, Markdown).
|
|
58
|
+
|
|
59
|
+
**Format:** Valid devcontainer patch — `customizations.vscode.extensions` array.
|
|
60
|
+
|
|
61
|
+
**Merge type:** `.json` — deep-merged into `devcontainer.json` patch
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
14
65
|
## Usage
|
|
15
66
|
|
|
16
|
-
|
|
67
|
+
Reference shared fragments in `overlay.yml` via the `imports` field:
|
|
17
68
|
|
|
18
69
|
```yaml
|
|
19
|
-
id:
|
|
70
|
+
id: my-overlay
|
|
20
71
|
imports:
|
|
21
|
-
- .shared/otel/
|
|
22
|
-
- .shared/
|
|
72
|
+
- .shared/otel/instrumentation.env
|
|
73
|
+
- .shared/vscode/recommended-extensions.json
|
|
23
74
|
```
|
|
24
75
|
|
|
25
|
-
|
|
76
|
+
**Rules:**
|
|
77
|
+
|
|
78
|
+
- All paths must begin with `.shared/`
|
|
79
|
+
- Paths are relative to `overlays/`
|
|
80
|
+
- Imports are applied in declaration order, then the overlay's own `devcontainer.patch.json` (overlay wins on conflict)
|
|
81
|
+
|
|
82
|
+
## Creating New Fragments
|
|
83
|
+
|
|
84
|
+
1. Choose the right subdirectory (`otel/`, `compose/`, `vscode/`, or create a new one with a clear name)
|
|
85
|
+
2. Use a descriptive file name — one concern per file
|
|
86
|
+
3. For `.json` and `.yaml` fragments, ensure the content is valid devcontainer patch format
|
|
87
|
+
4. Add a comment at the top explaining what the fragment does
|
|
88
|
+
5. Update this README with the new fragment's details and which overlays import it
|
|
26
89
|
|
|
27
|
-
|
|
28
|
-
- **Consistency**: All overlays using the same shared config stay in sync
|
|
29
|
-
- **Maintainability**: Update shared config once, all overlays benefit
|
|
30
|
-
- **Best Practices**: Shared configs embody proven patterns
|
|
90
|
+
## Downstream Impact
|
|
31
91
|
|
|
32
|
-
|
|
92
|
+
Any change to a shared fragment affects every overlay that imports it. Before editing:
|
|
33
93
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
4. Test that imports work correctly
|
|
94
|
+
- Check the "Imported by" section above for the fragment you're modifying
|
|
95
|
+
- Run `npm test` and `container-superposition doctor` after changes
|
|
96
|
+
- Consider whether the change should apply to all importers, or whether specific overlays need to be updated
|
|
38
97
|
|
|
39
98
|
## Import Resolution
|
|
40
99
|
|
|
41
100
|
- Imports are resolved relative to the `overlays/` directory
|
|
42
|
-
-
|
|
43
|
-
-
|
|
101
|
+
- Path traversal (`../`, absolute paths, non-`.shared/` prefixes) is rejected at composition time
|
|
102
|
+
- Missing or unsupported file types cause generation to fail with a message naming the overlay and the bad reference
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Common Docker Compose Healthcheck Patterns
|
|
2
|
+
|
|
3
|
+
Reference library of standard healthcheck patterns for common services. This is a **documentation file only** — it cannot be imported via `overlay.yml` `imports:` because it is not a devcontainer patch.
|
|
4
|
+
|
|
5
|
+
Copy the relevant pattern directly into your overlay's `docker-compose.yml`.
|
|
6
|
+
|
|
7
|
+
## HTTP
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
healthcheck:
|
|
11
|
+
test: ['CMD-SHELL', 'curl -f http://localhost:${PORT}/health || exit 1']
|
|
12
|
+
interval: 30s
|
|
13
|
+
timeout: 10s
|
|
14
|
+
retries: 3
|
|
15
|
+
start_period: 40s
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## PostgreSQL
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
healthcheck:
|
|
22
|
+
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-postgres}']
|
|
23
|
+
interval: 10s
|
|
24
|
+
timeout: 5s
|
|
25
|
+
retries: 5
|
|
26
|
+
start_period: 10s
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Redis
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
healthcheck:
|
|
33
|
+
test: ['CMD', 'redis-cli', 'ping']
|
|
34
|
+
interval: 10s
|
|
35
|
+
timeout: 5s
|
|
36
|
+
retries: 5
|
|
37
|
+
start_period: 10s
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## MongoDB
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
healthcheck:
|
|
44
|
+
test: ['CMD', 'mongosh', '--eval', "db.adminCommand('ping')"]
|
|
45
|
+
interval: 10s
|
|
46
|
+
timeout: 5s
|
|
47
|
+
retries: 5
|
|
48
|
+
start_period: 10s
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## MySQL
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
healthcheck:
|
|
55
|
+
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
|
|
56
|
+
interval: 10s
|
|
57
|
+
timeout: 5s
|
|
58
|
+
retries: 5
|
|
59
|
+
start_period: 10s
|
|
60
|
+
```
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
|
|
3
|
+
"customizations": {
|
|
4
|
+
"vscode": {
|
|
5
|
+
"extensions": [
|
|
6
|
+
"streetsidesoftware.code-spell-checker",
|
|
7
|
+
"usernamehw.errorlens",
|
|
8
|
+
"eamodio.gitlens",
|
|
9
|
+
"editorconfig.editorconfig",
|
|
10
|
+
"esbenp.prettier-vscode",
|
|
11
|
+
"ms-azuretools.vscode-docker",
|
|
12
|
+
"redhat.vscode-yaml",
|
|
13
|
+
"yzhang.markdown-all-in-one",
|
|
14
|
+
"davidanson.vscode-markdownlint"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
}
|
|
@@ -5,26 +5,11 @@ set -e
|
|
|
5
5
|
|
|
6
6
|
echo "🔧 Setting up Alertmanager integration..."
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
|
|
8
|
+
# Resolve the .devcontainer directory relative to this script.
|
|
9
|
+
# Scripts live at .devcontainer/scripts/, so .. is always .devcontainer/.
|
|
10
|
+
DEVCONTAINER_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd .. && pwd)"
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
if [ ! -d "$WORKSPACE_ROOT/.devcontainer" ]; then
|
|
13
|
-
# Try to detect a workspace under /workspaces (compose templates)
|
|
14
|
-
if [ -d "/workspaces" ]; then
|
|
15
|
-
FIRST_WORKSPACE_DIR="$(find /workspaces -maxdepth 1 -mindepth 1 -type d 2>/dev/null | head -n 1)"
|
|
16
|
-
if [ -n "$FIRST_WORKSPACE_DIR" ] && [ -d "$FIRST_WORKSPACE_DIR/.devcontainer" ]; then
|
|
17
|
-
WORKSPACE_ROOT="$FIRST_WORKSPACE_DIR"
|
|
18
|
-
fi
|
|
19
|
-
fi
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
# Fallback to /workspace if it exists and contains a .devcontainer (non-compose setups)
|
|
23
|
-
if [ ! -d "$WORKSPACE_ROOT/.devcontainer" ] && [ -d "/workspace/.devcontainer" ]; then
|
|
24
|
-
WORKSPACE_ROOT="/workspace"
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
PROMETHEUS_CONFIG="$WORKSPACE_ROOT/.devcontainer/prometheus-prometheus.yml"
|
|
12
|
+
PROMETHEUS_CONFIG="$DEVCONTAINER_DIR/prometheus-prometheus.yml"
|
|
28
13
|
|
|
29
14
|
# Check if Prometheus config exists
|
|
30
15
|
if [ -f "$PROMETHEUS_CONFIG" ]; then
|
|
@@ -6,19 +6,18 @@ echo "🔍 Verifying Alertmanager installation..."
|
|
|
6
6
|
# Track overall success
|
|
7
7
|
ALL_CHECKS_PASSED=true
|
|
8
8
|
|
|
9
|
-
# Check if Alertmanager
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
# Check if Alertmanager API is accessible (primary health signal).
|
|
10
|
+
# docker ps is used for info only — it may not be accessible in all setups.
|
|
11
|
+
if curl -s -o /dev/null -w "%{http_code}" http://alertmanager:9093/-/healthy 2>/dev/null | grep -q "200"; then
|
|
12
|
+
echo "✓ Alertmanager API is accessible"
|
|
12
13
|
else
|
|
13
|
-
echo "✗ Alertmanager
|
|
14
|
+
echo "✗ Alertmanager API not responding (http://alertmanager:9093/-/healthy)"
|
|
14
15
|
ALL_CHECKS_PASSED=false
|
|
15
16
|
fi
|
|
16
17
|
|
|
17
|
-
#
|
|
18
|
-
if
|
|
19
|
-
echo "✓ Alertmanager
|
|
20
|
-
else
|
|
21
|
-
echo "⚠️ Alertmanager API not responding yet (may still be starting)"
|
|
18
|
+
# Informational: check via docker ps if available.
|
|
19
|
+
if docker ps --format '{{.Names}}' 2>/dev/null | grep -q alertmanager; then
|
|
20
|
+
echo "✓ Alertmanager container visible in docker ps"
|
|
22
21
|
fi
|
|
23
22
|
|
|
24
23
|
# Final result
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Meta Overlay
|
|
2
|
+
|
|
3
|
+
Internal testing overlay that activates **all available overlays** at once. Used to verify that the full overlay catalogue can be composed without errors.
|
|
4
|
+
|
|
5
|
+
> **Not shown in the interactive questionnaire.** Use it directly in a `superposition.yml` or test script.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
The `all` overlay exists to make CI/integration testing straightforward: selecting it expands to every non-preset, non-hidden overlay in the live registry, exercising the full composition pipeline in one pass.
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
# superposition.yml
|
|
13
|
+
stack: compose
|
|
14
|
+
containerName: meta-test
|
|
15
|
+
overlays:
|
|
16
|
+
- all
|
|
17
|
+
outputPath: .devcontainer
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## How expansion works
|
|
21
|
+
|
|
22
|
+
There is no `requires` list in `overlays/all/overlay.yml`. Instead, the dependency resolver in
|
|
23
|
+
`resolveDependencies()` detects the special `all` overlay ID and replaces it with the full live
|
|
24
|
+
overlay registry (excluding hidden and preset overlays) at resolution time. This means:
|
|
25
|
+
|
|
26
|
+
- New overlays are automatically included the moment they are added to the catalogue — no manual
|
|
27
|
+
update to this file is needed.
|
|
28
|
+
- The expansion is driven by the live registry, not a hard-coded list.
|
|
29
|
+
|
|
30
|
+
## Conflicts
|
|
31
|
+
|
|
32
|
+
Some overlays expanded from `all` are mutually exclusive at runtime:
|
|
33
|
+
|
|
34
|
+
| Conflict | Details |
|
|
35
|
+
| ---------------------------------- | ------------------------------------------------------- |
|
|
36
|
+
| `docker-in-docker` ↔ `docker-sock` | Two different Docker access strategies — cannot coexist |
|
|
37
|
+
|
|
38
|
+
The composer will emit warnings for these conflicts. They are expected and do not block the build. The intent is to test patch composition, not to produce a runnable container.
|
|
39
|
+
|
|
40
|
+
## References
|
|
41
|
+
|
|
42
|
+
- [Overlay authoring guide](../../docs/creating-overlays.md)
|
|
43
|
+
- [All overlays](../../docs/overlays.md)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
id: all
|
|
2
|
+
name: All Overlays
|
|
3
|
+
description: Internal testing overlay that activates all available overlays to verify the full build
|
|
4
|
+
category: dev
|
|
5
|
+
hidden: true
|
|
6
|
+
supports: []
|
|
7
|
+
requires: []
|
|
8
|
+
suggests: []
|
|
9
|
+
conflicts: []
|
|
10
|
+
tags:
|
|
11
|
+
- internal
|
|
12
|
+
- testing
|
|
13
|
+
- all
|
|
14
|
+
ports: []
|
package/overlays/amp/setup.sh
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
set -e
|
|
5
5
|
|
|
6
|
+
# Source shared setup utilities (provides load_nvm)
|
|
7
|
+
# shellcheck source=setup-utils.sh
|
|
8
|
+
source "$(dirname "${BASH_SOURCE[0]}")/setup-utils.sh"
|
|
9
|
+
load_nvm
|
|
10
|
+
|
|
6
11
|
echo "📦 Installing Sourcegraph Amp CLI..."
|
|
7
12
|
|
|
8
13
|
# Install @sourcegraph/amp globally
|
package/overlays/bun/setup.sh
CHANGED
|
@@ -34,7 +34,7 @@ if ! command -v bun &> /dev/null; then
|
|
|
34
34
|
BUN_URL="https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-${BUN_ARCH}.zip"
|
|
35
35
|
|
|
36
36
|
echo " Downloading Bun version ${BUN_VERSION} for ${ARCH}..."
|
|
37
|
-
if ! wget "${BUN_URL}" -O /tmp/bun.zip
|
|
37
|
+
if ! wget -q "${BUN_URL}" -O /tmp/bun.zip; then
|
|
38
38
|
echo " ❌ Failed to download Bun from ${BUN_URL}"
|
|
39
39
|
exit 1
|
|
40
40
|
fi
|
|
@@ -61,6 +61,15 @@ fi
|
|
|
61
61
|
export BUN_INSTALL="$HOME/.bun"
|
|
62
62
|
export PATH="$BUN_INSTALL/bin:$PATH"
|
|
63
63
|
|
|
64
|
+
# Persist PATH so verify script (and interactive shells) can find bun
|
|
65
|
+
for _shell_rc in "$HOME/.bashrc" "$HOME/.profile"; do
|
|
66
|
+
if [ -f "$_shell_rc" ] && ! grep -q 'BUN_INSTALL' "$_shell_rc" 2>/dev/null; then
|
|
67
|
+
echo 'export BUN_INSTALL="$HOME/.bun"' >> "$_shell_rc"
|
|
68
|
+
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> "$_shell_rc"
|
|
69
|
+
fi
|
|
70
|
+
done
|
|
71
|
+
unset _shell_rc
|
|
72
|
+
|
|
64
73
|
# Verify installation
|
|
65
74
|
if command -v bun &> /dev/null; then
|
|
66
75
|
INSTALLED_VERSION=$(bun --version)
|
package/overlays/bun/verify.sh
CHANGED
|
@@ -7,10 +7,15 @@ echo "🔍 Verifying Bun overlay..."
|
|
|
7
7
|
echo ""
|
|
8
8
|
|
|
9
9
|
# Check Bun is installed
|
|
10
|
+
# The verify script runs in a non-interactive shell that may not have ~/.bun/bin on PATH.
|
|
10
11
|
echo "1️⃣ Checking Bun..."
|
|
11
|
-
|
|
12
|
+
BUN_BIN="${BUN_INSTALL:-$HOME/.bun}/bin/bun"
|
|
13
|
+
if command -v bun &>/dev/null; then
|
|
12
14
|
bun --version
|
|
13
15
|
echo " ✅ Bun found"
|
|
16
|
+
elif [ -x "$BUN_BIN" ]; then
|
|
17
|
+
"$BUN_BIN" --version
|
|
18
|
+
echo " ✅ Bun found (at $BUN_BIN)"
|
|
14
19
|
else
|
|
15
20
|
echo " ❌ Bun not found"
|
|
16
21
|
exit 1
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
set -e
|
|
5
5
|
|
|
6
|
+
# Source shared setup utilities (provides load_nvm)
|
|
7
|
+
# shellcheck source=setup-utils.sh
|
|
8
|
+
source "$(dirname "${BASH_SOURCE[0]}")/setup-utils.sh"
|
|
9
|
+
load_nvm
|
|
10
|
+
|
|
6
11
|
echo "📦 Installing Anthropic Claude Code CLI..."
|
|
7
12
|
|
|
8
13
|
# Install @anthropic-ai/claude-code globally
|
|
@@ -13,18 +13,15 @@ echo "📦 Installing cloudflared..."
|
|
|
13
13
|
# Check https://github.com/cloudflare/cloudflared/releases for newer versions
|
|
14
14
|
CF_VERSION="${CLOUDFLARED_VERSION:-2025.2.1}"
|
|
15
15
|
|
|
16
|
-
#
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
curl -sSL "$CF_URL" -o /tmp/cloudflared
|
|
26
|
-
sudo install -m 755 /tmp/cloudflared /usr/local/bin/cloudflared
|
|
27
|
-
rm -f /tmp/cloudflared
|
|
16
|
+
# Source shared setup utilities
|
|
17
|
+
# shellcheck source=setup-utils.sh
|
|
18
|
+
source "$(dirname "${BASH_SOURCE[0]}")/setup-utils.sh"
|
|
19
|
+
|
|
20
|
+
detect_arch amd64
|
|
21
|
+
|
|
22
|
+
install_binary \
|
|
23
|
+
"https://github.com/cloudflare/cloudflared/releases/download/${CF_VERSION}/cloudflared-linux-${CS_ARCH}" \
|
|
24
|
+
"cloudflared" "755"
|
|
28
25
|
|
|
29
26
|
# Verify installation
|
|
30
27
|
if command -v cloudflared &> /dev/null; then
|
package/overlays/codex/README.md
CHANGED
|
@@ -5,6 +5,7 @@ Adds OpenAI Codex CLI with a persistent `.codex` folder for configurations.
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **OpenAI Codex CLI** - AI-powered code generation and assistance from the command line
|
|
8
|
+
- **Bubblewrap** - Linux sandbox dependency installed as `bwrap` for Codex
|
|
8
9
|
- **Codex directory** - Creates `$HOME/.codex` for persistent configurations
|
|
9
10
|
|
|
10
11
|
## What is OpenAI Codex CLI?
|
|
@@ -26,8 +27,9 @@ The OpenAI Codex CLI (`@openai/codex`) provides command-line access to OpenAI's
|
|
|
26
27
|
|
|
27
28
|
This overlay:
|
|
28
29
|
|
|
29
|
-
1. Installs
|
|
30
|
-
2.
|
|
30
|
+
1. Installs the Linux `bubblewrap` package so `bwrap` is available for Codex sandboxing
|
|
31
|
+
2. Installs OpenAI Codex CLI globally via npm (`npm install -g @openai/codex`)
|
|
32
|
+
3. Creates the `$HOME/.codex` directory for persistent configurations
|
|
31
33
|
|
|
32
34
|
**After setup:**
|
|
33
35
|
|
|
@@ -39,12 +41,13 @@ This overlay:
|
|
|
39
41
|
After setup, run the verification script to ensure proper installation:
|
|
40
42
|
|
|
41
43
|
```bash
|
|
42
|
-
bash .devcontainer/verify-codex.sh
|
|
44
|
+
bash .devcontainer/scripts/verify-codex.sh
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
This will check:
|
|
46
48
|
|
|
47
49
|
- Codex CLI is installed and in PATH
|
|
50
|
+
- `bwrap` is installed and in PATH
|
|
48
51
|
- `.codex` directory exists
|
|
49
52
|
|
|
50
53
|
## Troubleshooting
|
|
@@ -90,7 +93,7 @@ codex explain "what does this regex do: /^[a-zA-Z0-9]+$/"
|
|
|
90
93
|
codex complete "function fibonacci(n) {"
|
|
91
94
|
```
|
|
92
95
|
|
|
93
|
-
For full documentation, visit: [OpenAI Codex CLI Documentation](https://github.com/openai/
|
|
96
|
+
For full documentation, visit: [OpenAI Codex CLI Documentation](https://github.com/openai/codex)
|
|
94
97
|
|
|
95
98
|
## Optional: Persistent .codex Mount
|
|
96
99
|
|
|
@@ -104,7 +107,7 @@ Then add this mount to your `devcontainer.json`:
|
|
|
104
107
|
|
|
105
108
|
```json
|
|
106
109
|
"mounts": [
|
|
107
|
-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.codex,target
|
|
110
|
+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.codex,target=/home/vscode/.codex,type=bind,consistency=cached"
|
|
108
111
|
]
|
|
109
112
|
```
|
|
110
113
|
|
|
@@ -124,5 +127,5 @@ This allows you to:
|
|
|
124
127
|
|
|
125
128
|
## Additional Resources
|
|
126
129
|
|
|
127
|
-
- [OpenAI Codex CLI](https://github.com/openai/
|
|
130
|
+
- [OpenAI Codex CLI](https://github.com/openai/codex)
|
|
128
131
|
- [OpenAI Platform](https://platform.openai.com/)
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json"
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
|
|
3
|
+
"features": {
|
|
4
|
+
"./features/cross-distro-packages": {
|
|
5
|
+
"apt": "bubblewrap",
|
|
6
|
+
"apk": "bubblewrap"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
3
9
|
}
|
package/overlays/codex/setup.sh
CHANGED
package/overlays/codex/verify.sh
CHANGED
|
@@ -5,6 +5,14 @@ set -e
|
|
|
5
5
|
|
|
6
6
|
echo "🔍 Verifying Codex overlay setup..."
|
|
7
7
|
|
|
8
|
+
# Check if bubblewrap is installed for Codex sandboxing on Linux
|
|
9
|
+
if ! command -v bwrap &> /dev/null; then
|
|
10
|
+
echo "✗ bubblewrap is not installed or not in PATH"
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
echo "✓ bubblewrap is installed: $(bwrap --version 2>/dev/null | head -n 1 || echo 'installed')"
|
|
15
|
+
|
|
8
16
|
# Check if codex CLI is installed
|
|
9
17
|
if ! command -v codex &> /dev/null; then
|
|
10
18
|
echo "✗ codex CLI is not installed or not in PATH"
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
set -e
|
|
5
5
|
|
|
6
|
+
# Source shared setup utilities (provides load_nvm)
|
|
7
|
+
# shellcheck source=setup-utils.sh
|
|
8
|
+
source "$(dirname "${BASH_SOURCE[0]}")/setup-utils.sh"
|
|
9
|
+
load_nvm
|
|
10
|
+
|
|
6
11
|
echo "📝 Setting up commitlint..."
|
|
7
12
|
|
|
8
13
|
# Install commitlint and conventional commits config globally
|