@deployfoundation/foundation-deploy 0.2.50 → 0.2.52
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 +4 -1
- package/agent-image/Dockerfile +36 -1
- package/dist/bin/app.js +6 -3
- package/dist/bin/foundation-deploy.js +139 -305
- package/dist/bin/release-account.js +1 -0
- package/dist/chunk-3614v9rr.js +907 -0
- package/dist/{chunk-efqdhd2e.js → chunk-59dpqyap.js} +254 -90
- package/dist/chunk-5wgwscd0.js +4 -0
- package/dist/{chunk-gnz747z2.js → chunk-96fjaysn.js} +204 -884
- package/dist/chunk-9zx95xs6.js +259 -0
- package/dist/chunk-jf5rw6h4.js +1117 -0
- package/dist/chunk-m76jt5rc.js +376 -0
- package/dist/chunk-mh1206ne.js +1764 -0
- package/dist/chunk-p7zkm4pp.js +151 -0
- package/dist/chunk-pxhftba1.js +336 -0
- package/dist/chunk-rxetj2p9.js +466 -0
- package/dist/chunk-sgdcmme0.js +301 -0
- package/dist/chunk-tey0gh86.js +38 -0
- package/dist/src/index.js +17 -13
- package/package.json +3 -1
- package/src/deploy/cli.ts +71 -0
- package/src/deploy/crm.ts +491 -0
- package/src/stacks/agent-stack.ts +34 -11
- package/src/stacks/api-stack.ts +340 -87
- package/src/stacks/data-stack.ts +27 -1
package/README.md
CHANGED
|
@@ -54,9 +54,12 @@ bun run packages/infra/bin/foundation-deploy.ts <command> --instance <path>
|
|
|
54
54
|
| `github-app-create` | Create the instance's GitHub App from the shipped manifest template. |
|
|
55
55
|
| `slack-manifest` | Print the instance's Slack app manifest as JSON (the Slack CLI's `get-manifest` hook contract). |
|
|
56
56
|
| `stage-customization` | Validate and stage a tenant-owned runtime config. |
|
|
57
|
+
| `crm-key` | Write the company CRM's `crm/1` key, piped in with `--stdin`, into `<secretPrefix>/crm/http` (`crm.provider` kind `http`). |
|
|
58
|
+
| `crm-check` | Run the `crm/1` conformance suite: the read cases against the instance's CRM with its stored key, or, with `--base-url --tenant --key-stdin` and no instance, any server, write cases included. |
|
|
59
|
+
| `crm-replay` | Replay the agent's CRM writes (JSONL) into the instance's own table after a rollback to the DynamoDB provider. |
|
|
57
60
|
|
|
58
61
|
`--instance <path>` is required for every command (or `FOUNDATION_INSTANCE_FILE`
|
|
59
|
-
in a pipeline). There is no instance *name*, no `instances/` directory and no
|
|
62
|
+
in a pipeline), except `crm-check --base-url`, which checks a server rather than a deployment. There is no instance *name*, no `instances/` directory and no
|
|
60
63
|
default: a deploy that guessed its target would be a deploy into the wrong
|
|
61
64
|
account.
|
|
62
65
|
|
package/agent-image/Dockerfile
CHANGED
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
# playwright-core 1.63.0 (exact pins + frozen lockfile in
|
|
21
21
|
# packages/infra/agent-image/open-slide/), whose Chrome Headless Shell
|
|
22
22
|
# build is pinned by the playwright-core version
|
|
23
|
+
# - Node.js 24.22.1 (LTS) with npm, and pnpm through corepack, for the
|
|
24
|
+
# repositories the agent clones and tests (see the node-provider stage)
|
|
23
25
|
#
|
|
24
26
|
# Secrets bootstrap: the container receives ONE pointer env var,
|
|
25
27
|
# RUNTIME_SECRET_ID. At start, server.ts fetches that JSON secret from Secrets
|
|
@@ -40,6 +42,9 @@ ARG GH_VERSION=2.97.0
|
|
|
40
42
|
# no ECR access; a deploy pipeline can override it with a mirrored tag to stay
|
|
41
43
|
# clear of Docker Hub's anonymous rate limit.
|
|
42
44
|
ARG BUN_IMAGE=oven/bun:1.4.0-slim
|
|
45
|
+
# NODE_IMAGE: where the real Node.js comes from (node-provider stage). AWS's
|
|
46
|
+
# mirror of the Docker official image, like golang below.
|
|
47
|
+
ARG NODE_IMAGE=public.ecr.aws/docker/library/node:24.22.1-trixie-slim
|
|
43
48
|
# GH_IMAGE: where the gh BINARY comes from. The default names the `gh-source`
|
|
44
49
|
# stage below, so a local build compiles it; an override points at a prebuilt
|
|
45
50
|
# image, and under BuildKit an unreferenced stage never runs — which takes the
|
|
@@ -129,6 +134,15 @@ COPY skills/slides/export_deck.mjs skills/slides/starter.tsx ./
|
|
|
129
134
|
# below is what makes the choice load-bearing.
|
|
130
135
|
FROM ${GH_IMAGE} AS gh-provider
|
|
131
136
|
|
|
137
|
+
# --- Node.js (repositories the agent works in) -------------------------------
|
|
138
|
+
# The bun base ships only Bun's `node` shim (/usr/local/bun-node-fallback-bin),
|
|
139
|
+
# which refuses real Node invocations ("Missing script to execute"). Turns in a
|
|
140
|
+
# Node repository then began by downloading and unpacking a Node tarball before
|
|
141
|
+
# they could typecheck or test anything (Olivia, every PR turn, 2026-10). The
|
|
142
|
+
# runtime stage copies the official build's binary and its bundled npm and
|
|
143
|
+
# corepack from here; nothing else from this image is used.
|
|
144
|
+
FROM ${NODE_IMAGE} AS node-provider
|
|
145
|
+
|
|
132
146
|
# --- runtime ----------------------------------------------------------------
|
|
133
147
|
FROM ${BUN_IMAGE}
|
|
134
148
|
|
|
@@ -142,8 +156,12 @@ ARG FOUNDATION_GITHUB_APP_ID=0
|
|
|
142
156
|
# credential probe checks — without this pointer the omp Bedrock provider
|
|
143
157
|
# refuses with "No API key found". The real IMDS control is the tool policy
|
|
144
158
|
# denying 169.254.169.254, not an env var a raw curl could ignore.
|
|
159
|
+
#
|
|
160
|
+
# No NODE_ENV=production: nothing in Foundation reads it (the install below
|
|
161
|
+
# passes --production itself), and the agent's shell inherits the container
|
|
162
|
+
# env, so `pnpm install` and `npm install` in a cloned repository skipped its
|
|
163
|
+
# devDependencies and every typecheck or test then failed on missing modules.
|
|
145
164
|
ENV AWS_EC2_METADATA_SERVICE_ENDPOINT=http://169.254.169.254 \
|
|
146
|
-
NODE_ENV=production \
|
|
147
165
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
148
166
|
PYTHONUNBUFFERED=1 \
|
|
149
167
|
# omp env sheet: relocate the agent base to the baked container dir
|
|
@@ -239,6 +257,23 @@ RUN chmod 0755 /opt/sky/bin/export_deck
|
|
|
239
257
|
ENV OPEN_SLIDE_HOME=/opt/open-slide \
|
|
240
258
|
PLAYWRIGHT_BROWSERS_PATH=/opt/open-slide/browsers
|
|
241
259
|
|
|
260
|
+
# --- Node.js, npm and pnpm (node-provider stage) -----------------------------
|
|
261
|
+
# /usr/local/bin precedes the bun base's fallback directory on PATH, so `node`
|
|
262
|
+
# is the real binary from here on; the build fails if it is not. pnpm is a
|
|
263
|
+
# corepack shim: it runs the version a repository's `packageManager` names,
|
|
264
|
+
# fetched on first use into the runtime user's cache, so no repository's pin is
|
|
265
|
+
# baked into the product. The prompt corepack shows before that fetch would
|
|
266
|
+
# stall a non-interactive shell.
|
|
267
|
+
COPY --from=node-provider /usr/local/bin/node /usr/local/bin/node
|
|
268
|
+
COPY --from=node-provider /usr/local/lib/node_modules /usr/local/lib/node_modules
|
|
269
|
+
RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
|
|
270
|
+
&& ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \
|
|
271
|
+
&& ln -s ../lib/node_modules/corepack/dist/corepack.js /usr/local/bin/corepack \
|
|
272
|
+
&& corepack enable --install-directory /usr/local/bin pnpm \
|
|
273
|
+
&& test "$(command -v node)" = /usr/local/bin/node \
|
|
274
|
+
&& node --version && npm --version && corepack --version
|
|
275
|
+
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
|
276
|
+
|
|
242
277
|
# /opt/sky/bin FIRST so `gh` and `aws` resolve to the wrappers, never the real
|
|
243
278
|
# binaries.
|
|
244
279
|
ENV PATH="/opt/sky/bin:${PATH}"
|
package/dist/bin/app.js
CHANGED
|
@@ -8,14 +8,17 @@ import {
|
|
|
8
8
|
FoundationPages,
|
|
9
9
|
FoundationPipeline,
|
|
10
10
|
NewsletterStack
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-59dpqyap.js";
|
|
12
|
+
import"../chunk-pxhftba1.js";
|
|
13
|
+
import"../chunk-dz91avrb.js";
|
|
12
14
|
import {
|
|
13
15
|
adminsFor,
|
|
14
16
|
instanceNames,
|
|
15
17
|
loadInstanceFile,
|
|
16
18
|
provisionsIntegration
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import"../chunk-
|
|
19
|
+
} from "../chunk-rxetj2p9.js";
|
|
20
|
+
import"../chunk-96fjaysn.js";
|
|
21
|
+
import"../chunk-5wgwscd0.js";
|
|
19
22
|
|
|
20
23
|
// bin/app.ts
|
|
21
24
|
import * as cdk from "aws-cdk-lib";
|