@mutmutco/codex-plugin 4.5.102 → 4.5.104
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/.codex-plugin/plugin.json +1 -1
- package/cli/dist/main.cjs +201 -61
- package/cli/package.json +1 -1
- package/package.json +1 -1
- package/skills/bootstrap/SKILL.md +5 -1
- package/skills/bootstrap/seeds/suite-Dockerfile.template +32 -0
- package/skills/bootstrap/seeds/suite-compose.template.yml +26 -0
- package/skills/bootstrap/seeds/suite-files.template.json +1 -0
- package/skills/bootstrap/seeds/suite-gate.template.yml +35 -0
- package/skills/bootstrap/seeds/suite-guide.template.md +11 -0
- package/skills/bootstrap/seeds/suite-module-package-lock.template.json +887 -0
- package/skills/bootstrap/seeds/suite-module-package.template.json +23 -0
- package/skills/bootstrap/seeds/suite-module.template.jsx +105 -0
- package/skills/bootstrap/seeds/suite-npmrc.template +2 -0
- package/skills/bootstrap/seeds/suite-package-lock.template.json +50 -0
- package/skills/bootstrap/seeds/suite-package.template.json +19 -0
- package/skills/bootstrap/seeds/suite-screens.template.json +170 -0
- package/skills/bootstrap/seeds/suite-screens.template.yml +61 -0
- package/skills/bootstrap/seeds/suite-server.template.ts +22 -0
- package/skills/bootstrap/seeds/suite-tsconfig.template.json +14 -0
- package/skills/bootstrap/seeds/suite-vite.template.mjs +12 -0
- package/skills/org-guide/references/domains-and-oauth.md +3 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# MM-Work module tenant container: the TypeScript server plus the module bundle it serves.
|
|
2
|
+
|
|
3
|
+
# The module bundle. The GitHub Packages token (for @mutmutco/mmwork-ds) arrives as a BuildKit secret
|
|
4
|
+
# and is never written into a layer; compose passes it from the registry's requiredBuildSecrets.
|
|
5
|
+
FROM node:24-bookworm-slim AS module-build
|
|
6
|
+
WORKDIR /module
|
|
7
|
+
COPY module/package.json module/package-lock.json module/.npmrc ./
|
|
8
|
+
RUN --mount=type=secret,id=NODE_AUTH_TOKEN,env=NODE_AUTH_TOKEN npm ci --no-audit --no-fund
|
|
9
|
+
COPY module/src ./src
|
|
10
|
+
COPY module/vite.config.mjs ./
|
|
11
|
+
RUN npm run build
|
|
12
|
+
|
|
13
|
+
# The server.
|
|
14
|
+
FROM node:24-bookworm-slim AS server-build
|
|
15
|
+
WORKDIR /app
|
|
16
|
+
COPY package.json package-lock.json ./
|
|
17
|
+
RUN npm ci --no-audit --no-fund
|
|
18
|
+
COPY tsconfig.json ./
|
|
19
|
+
COPY src ./src
|
|
20
|
+
RUN npm run build && npm prune --omit=dev
|
|
21
|
+
|
|
22
|
+
FROM node:24-bookworm-slim AS runtime
|
|
23
|
+
WORKDIR /app
|
|
24
|
+
ENV NODE_ENV=production
|
|
25
|
+
COPY --from=server-build /app/package.json ./package.json
|
|
26
|
+
COPY --from=server-build /app/node_modules ./node_modules
|
|
27
|
+
COPY --from=server-build /app/dist ./dist
|
|
28
|
+
COPY --from=module-build /module/dist/module.js ./module/dist/module.js
|
|
29
|
+
USER node
|
|
30
|
+
EXPOSE 3000
|
|
31
|
+
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s CMD node -e "fetch('http://127.0.0.1:'+(process.env.PORT||3000)+'/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
|
|
32
|
+
CMD ["node", "dist/index.js"]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
services:
|
|
2
|
+
app:
|
|
3
|
+
build:
|
|
4
|
+
context: .
|
|
5
|
+
dockerfile: Dockerfile
|
|
6
|
+
secrets:
|
|
7
|
+
- NODE_AUTH_TOKEN
|
|
8
|
+
restart: unless-stopped
|
|
9
|
+
# Fileless deploy (DEPLOY#<stage>.noEnvFile: true): no .env exists. tenant-deploy.yml streams the
|
|
10
|
+
# stage-scoped vault values over SSH into a tmpfs (/dev/shm) runtime env, and the box injects them
|
|
11
|
+
# into every service labelled mmi.runtime-env. Never add env_file.
|
|
12
|
+
labels:
|
|
13
|
+
mmi.runtime-env: "true"
|
|
14
|
+
environment:
|
|
15
|
+
NODE_ENV: production
|
|
16
|
+
MMI_STAGE: ${MMI_STAGE:-dev}
|
|
17
|
+
MMI_PORT: ${MMI_PORT:-3000}
|
|
18
|
+
PORT: ${PORT:-3000}
|
|
19
|
+
MMI_EDGE_DOMAIN: ${MMI_EDGE_DOMAIN:-}
|
|
20
|
+
ports:
|
|
21
|
+
# Loopback only: the box Caddy is the one public door (TLS), never the bare port.
|
|
22
|
+
- "127.0.0.1:${MMI_PORT:-3000}:${PORT:-3000}"
|
|
23
|
+
|
|
24
|
+
secrets:
|
|
25
|
+
NODE_AUTH_TOKEN:
|
|
26
|
+
environment: NODE_AUTH_TOKEN
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "result": { "items": [{ "id": "sample", "name": "Sample brief" }] } }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: gate
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
branches: {{GATE_PUSH_BRANCHES_YAML}}
|
|
6
|
+
tags: ['v*']
|
|
7
|
+
concurrency:
|
|
8
|
+
group: gate-${{ github.event.pull_request.number || github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
packages: read
|
|
13
|
+
jobs:
|
|
14
|
+
gate:
|
|
15
|
+
runs-on: [self-hosted, linux, x64, mmi-live]
|
|
16
|
+
timeout-minutes: 10
|
|
17
|
+
steps:
|
|
18
|
+
- uses: mutmutco/MMI-Hub/.github/actions/runner-checkout@{{GATE_RUNNER_SHA}}
|
|
19
|
+
with:
|
|
20
|
+
lockfile-path: package-lock.json
|
|
21
|
+
- name: Isolate npm cache
|
|
22
|
+
run: echo "NPM_CONFIG_CACHE=$RUNNER_TEMP/npm-cache" >> "$GITHUB_ENV"
|
|
23
|
+
- uses: mutmutco/MMI-Hub/.github/actions/runner-node-toolchain@{{GATE_RUNNER_SHA}}
|
|
24
|
+
with:
|
|
25
|
+
node-version: 24
|
|
26
|
+
npm-version: '12'
|
|
27
|
+
- run: npm ci --no-audit --no-fund
|
|
28
|
+
- run: npm ci --prefix module --no-audit --no-fund
|
|
29
|
+
env:
|
|
30
|
+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
31
|
+
- uses: mutmutco/MMI-Hub/.github/actions/run-with-budget@{{GATE_BUDGET_SHA}}
|
|
32
|
+
with:
|
|
33
|
+
command: npm run typecheck && npm run build && npm --prefix module run check
|
|
34
|
+
max-seconds: {{GATE_MAX_SECONDS}}
|
|
35
|
+
working-directory: .
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# MM-Work module
|
|
2
|
+
|
|
3
|
+
Read the matching `module/node_modules/@mutmutco/mmwork-ds/GUIDE.md` before changing this module. The starter entry and Vite setting come from MM-Work's `examples/example-module`; replace the example screens with your product's screens using only the shared design system.
|
|
4
|
+
|
|
5
|
+
Sign-in belongs to MM-Work: verify its pass before adding protected backend routes. Do not provision a Google OAuth client or implement a separate login. Google and other shared services are reached through `ctx.act`, not module-owned credentials.
|
|
6
|
+
|
|
7
|
+
Before the first CI/deploy, an org admin must grant this repo **Read** on `@mutmutco/mmwork-ds` under **Package settings → Manage Actions access**. This has no GitHub REST API. The Actions token installs the module in CI; the tenant image build uses the registry's `NODE_AUTH_TOKEN=@github-packages-token` BuildKit secret. Never commit a token.
|
|
8
|
+
|
|
9
|
+
The server exposes `/health` and `/module.js`. Register the module's bundle URL, id, name and capabilities with MM-Work following the GUIDE. The seed deliberately exposes no authenticated product API yet.
|
|
10
|
+
|
|
11
|
+
`gate` installs and checks the backend and module. `screens / screens` follows MM-PM's non-blocking PR/push/tag shape, using MM-Work's reusable runner with `run: false` (browser audits are not merge gates). Configure scheduled/on-demand screen audits separately when the product has screens to audit.
|