@terreno/mcp 56.0.0-beta.0 → 57.0.0-beta.1
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/LICENSE +21 -0
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +10 -11
- package/dist/bootstrap.js.map +1 -1
- package/dist/docs/templates/bootstrap/backend/types/models/userTypes.template.md +5 -4
- package/dist/docs/templates/tools/model.template.md +4 -2
- package/dist/docs/upgrades/0.31.0.md +60 -0
- package/dist/docs/upgrades/56.0.0-beta.2.md +59 -0
- package/dist/docs/upgrades/57.0.0-beta.1.md +41 -0
- package/dist/docs/versioned/next/README.md +1 -0
- package/dist/docs/versioned/next/explanation/README.md +7 -1
- package/dist/docs/versioned/next/explanation/deployment-architecture-gcp.md +65 -0
- package/dist/docs/versioned/next/explanation/deployment-baseline.md +78 -0
- package/dist/docs/versioned/next/explanation/positioning.md +164 -0
- package/dist/docs/versioned/next/explanation/repository-settings.md +44 -0
- package/dist/docs/versioned/next/explanation/roadmap-process.md +330 -0
- package/dist/docs/versioned/next/explanation/roadmap-seed-issues.md +887 -0
- package/dist/docs/versioned/next/how-to/README.md +8 -0
- package/dist/docs/versioned/next/how-to/build-for-web.md +69 -0
- package/dist/docs/versioned/next/how-to/deploy-backend-to-cloud-run.md +115 -0
- package/dist/docs/versioned/next/how-to/deploy-to-gcp.md +20 -228
- package/dist/docs/versioned/next/how-to/deploy-web-to-gcs-cdn.md +183 -0
- package/dist/docs/versioned/next/implementationPlans/PLAN_INDEX.md +31 -0
- package/dist/docs/versioned/next/implementationPlans/README.md +56 -30
- package/dist/docs/versioned/next/implementationPlans/agentic-sdlc-plugin.md +2 -1
- package/dist/docs/versioned/next/implementationPlans/ai-dev-loop-boost.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/b2b-platform-program.md +115 -0
- package/dist/docs/versioned/next/implementationPlans/billing-stripe.md +158 -0
- package/dist/docs/versioned/next/implementationPlans/build-terreno-app-validation.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/comms-abstraction.md +323 -0
- package/dist/docs/versioned/next/implementationPlans/comms-adapter-expo-push.md +107 -0
- package/dist/docs/versioned/next/implementationPlans/comms-adapter-sendgrid.md +157 -0
- package/dist/docs/versioned/next/implementationPlans/comms-adapter-twilio-sms.md +155 -0
- package/dist/docs/versioned/next/implementationPlans/comms-adapter-twilio-verify.md +99 -0
- package/dist/docs/versioned/next/implementationPlans/comms-admin-dashboard.md +180 -0
- package/dist/docs/versioned/next/implementationPlans/deploy-to-gcp.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/deploy-to-vercel.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/deployment-foundation.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/docs-reference-coverage.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/docs-tutorials-ai-first.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/examples-demo-coverage.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/infra-mcp-research.md +188 -0
- package/dist/docs/versioned/next/implementationPlans/infra-mcp.md +269 -0
- package/dist/docs/versioned/next/implementationPlans/migrate-cicd-to-circleci-research.md +126 -0
- package/dist/docs/versioned/next/implementationPlans/migrate-cicd-to-circleci.md +269 -0
- package/dist/docs/versioned/next/implementationPlans/native-module-baseline.md +105 -0
- package/dist/docs/versioned/next/implementationPlans/orgs-and-teams.md +158 -0
- package/dist/docs/versioned/next/implementationPlans/oss-governance-baseline.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/password-reset-and-email-verification.md +147 -0
- package/dist/docs/versioned/next/implementationPlans/positioning-django-rails-universal.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/public-roadmap-github.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/upgrade-guides-and-skill.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/web-ssr-and-admin-spa.md +1 -0
- package/dist/docs/versioned/next/reference/README.md +5 -0
- package/dist/docs/versioned/next/reference/admin-spa.md +130 -0
- package/dist/docs/versioned/next/reference/ai.md +519 -0
- package/dist/docs/versioned/next/reference/comms.md +132 -0
- package/dist/docs/versioned/next/reference/environment-variables.md +229 -382
- package/dist/docs/versioned/next/reference/test.md +108 -0
- package/dist/docs/versioned/next/roadmap.md +9 -0
- package/dist/docs/versioned/next/tasks/README.md +42 -0
- package/dist/docs/versioned/next/tasks/agentic-sdlc-plugin.md +5 -5
- package/dist/docs/versioned/next/tasks/billing-stripe.md +75 -0
- package/dist/docs/versioned/next/tasks/comms-abstraction.md +90 -0
- package/dist/docs/versioned/next/tasks/comms-adapter-expo-push.md +29 -0
- package/dist/docs/versioned/next/tasks/comms-adapter-sendgrid.md +39 -0
- package/dist/docs/versioned/next/tasks/comms-adapter-twilio-sms.md +39 -0
- package/dist/docs/versioned/next/tasks/comms-adapter-twilio-verify.md +19 -0
- package/dist/docs/versioned/next/tasks/comms-admin-dashboard.md +52 -0
- package/dist/docs/versioned/next/tasks/deploy-to-gcp.md +11 -11
- package/dist/docs/versioned/next/tasks/deployment-foundation.md +12 -12
- package/dist/docs/versioned/next/tasks/docs-reference-coverage.md +4 -4
- package/dist/docs/versioned/next/tasks/infra-mcp.md +43 -0
- package/dist/docs/versioned/next/tasks/migrate-cicd-to-circleci.md +215 -0
- package/dist/docs/versioned/next/tasks/native-module-baseline.md +42 -0
- package/dist/docs/versioned/next/tasks/orgs-and-teams.md +70 -0
- package/dist/docs/versioned/next/tasks/oss-governance-baseline.md +18 -18
- package/dist/docs/versioned/next/tasks/password-reset-and-email-verification.md +60 -0
- package/dist/docs/versioned/next/tasks/positioning-django-rails-universal.md +4 -4
- package/dist/docs/versioned/next/tasks/public-roadmap-github.md +15 -15
- package/package.json +4 -3
- package/src/docs/templates/bootstrap/backend/types/models/userTypes.template.md +5 -4
- package/src/docs/templates/tools/model.template.md +4 -2
- package/src/docs/upgrades/0.31.0.md +60 -0
- package/src/docs/upgrades/56.0.0-beta.2.md +59 -0
- package/src/docs/upgrades/57.0.0-beta.1.md +41 -0
- package/src/docs/versioned/next/README.md +1 -0
- package/src/docs/versioned/next/explanation/README.md +7 -1
- package/src/docs/versioned/next/explanation/deployment-architecture-gcp.md +65 -0
- package/src/docs/versioned/next/explanation/deployment-baseline.md +78 -0
- package/src/docs/versioned/next/explanation/positioning.md +164 -0
- package/src/docs/versioned/next/explanation/repository-settings.md +44 -0
- package/src/docs/versioned/next/explanation/roadmap-process.md +330 -0
- package/src/docs/versioned/next/explanation/roadmap-seed-issues.md +887 -0
- package/src/docs/versioned/next/how-to/README.md +8 -0
- package/src/docs/versioned/next/how-to/build-for-web.md +69 -0
- package/src/docs/versioned/next/how-to/deploy-backend-to-cloud-run.md +115 -0
- package/src/docs/versioned/next/how-to/deploy-to-gcp.md +20 -228
- package/src/docs/versioned/next/how-to/deploy-web-to-gcs-cdn.md +183 -0
- package/src/docs/versioned/next/implementationPlans/PLAN_INDEX.md +31 -0
- package/src/docs/versioned/next/implementationPlans/README.md +56 -30
- package/src/docs/versioned/next/implementationPlans/agentic-sdlc-plugin.md +2 -1
- package/src/docs/versioned/next/implementationPlans/ai-dev-loop-boost.md +1 -0
- package/src/docs/versioned/next/implementationPlans/b2b-platform-program.md +115 -0
- package/src/docs/versioned/next/implementationPlans/billing-stripe.md +158 -0
- package/src/docs/versioned/next/implementationPlans/build-terreno-app-validation.md +1 -0
- package/src/docs/versioned/next/implementationPlans/comms-abstraction.md +323 -0
- package/src/docs/versioned/next/implementationPlans/comms-adapter-expo-push.md +107 -0
- package/src/docs/versioned/next/implementationPlans/comms-adapter-sendgrid.md +157 -0
- package/src/docs/versioned/next/implementationPlans/comms-adapter-twilio-sms.md +155 -0
- package/src/docs/versioned/next/implementationPlans/comms-adapter-twilio-verify.md +99 -0
- package/src/docs/versioned/next/implementationPlans/comms-admin-dashboard.md +180 -0
- package/src/docs/versioned/next/implementationPlans/deploy-to-gcp.md +1 -0
- package/src/docs/versioned/next/implementationPlans/deploy-to-vercel.md +1 -0
- package/src/docs/versioned/next/implementationPlans/deployment-foundation.md +1 -0
- package/src/docs/versioned/next/implementationPlans/docs-reference-coverage.md +1 -0
- package/src/docs/versioned/next/implementationPlans/docs-tutorials-ai-first.md +1 -0
- package/src/docs/versioned/next/implementationPlans/examples-demo-coverage.md +1 -0
- package/src/docs/versioned/next/implementationPlans/infra-mcp-research.md +188 -0
- package/src/docs/versioned/next/implementationPlans/infra-mcp.md +269 -0
- package/src/docs/versioned/next/implementationPlans/migrate-cicd-to-circleci-research.md +126 -0
- package/src/docs/versioned/next/implementationPlans/migrate-cicd-to-circleci.md +269 -0
- package/src/docs/versioned/next/implementationPlans/native-module-baseline.md +105 -0
- package/src/docs/versioned/next/implementationPlans/orgs-and-teams.md +158 -0
- package/src/docs/versioned/next/implementationPlans/oss-governance-baseline.md +1 -0
- package/src/docs/versioned/next/implementationPlans/password-reset-and-email-verification.md +147 -0
- package/src/docs/versioned/next/implementationPlans/positioning-django-rails-universal.md +1 -0
- package/src/docs/versioned/next/implementationPlans/public-roadmap-github.md +1 -0
- package/src/docs/versioned/next/implementationPlans/upgrade-guides-and-skill.md +1 -0
- package/src/docs/versioned/next/implementationPlans/web-ssr-and-admin-spa.md +1 -0
- package/src/docs/versioned/next/reference/README.md +5 -0
- package/src/docs/versioned/next/reference/admin-spa.md +130 -0
- package/src/docs/versioned/next/reference/ai.md +519 -0
- package/src/docs/versioned/next/reference/comms.md +132 -0
- package/src/docs/versioned/next/reference/environment-variables.md +229 -382
- package/src/docs/versioned/next/reference/test.md +108 -0
- package/src/docs/versioned/next/roadmap.md +9 -0
- package/src/docs/versioned/next/tasks/README.md +42 -0
- package/src/docs/versioned/next/tasks/agentic-sdlc-plugin.md +5 -5
- package/src/docs/versioned/next/tasks/billing-stripe.md +75 -0
- package/src/docs/versioned/next/tasks/comms-abstraction.md +90 -0
- package/src/docs/versioned/next/tasks/comms-adapter-expo-push.md +29 -0
- package/src/docs/versioned/next/tasks/comms-adapter-sendgrid.md +39 -0
- package/src/docs/versioned/next/tasks/comms-adapter-twilio-sms.md +39 -0
- package/src/docs/versioned/next/tasks/comms-adapter-twilio-verify.md +19 -0
- package/src/docs/versioned/next/tasks/comms-admin-dashboard.md +52 -0
- package/src/docs/versioned/next/tasks/deploy-to-gcp.md +11 -11
- package/src/docs/versioned/next/tasks/deployment-foundation.md +12 -12
- package/src/docs/versioned/next/tasks/docs-reference-coverage.md +4 -4
- package/src/docs/versioned/next/tasks/infra-mcp.md +43 -0
- package/src/docs/versioned/next/tasks/migrate-cicd-to-circleci.md +215 -0
- package/src/docs/versioned/next/tasks/native-module-baseline.md +42 -0
- package/src/docs/versioned/next/tasks/orgs-and-teams.md +70 -0
- package/src/docs/versioned/next/tasks/oss-governance-baseline.md +18 -18
- package/src/docs/versioned/next/tasks/password-reset-and-email-verification.md +60 -0
- package/src/docs/versioned/next/tasks/positioning-django-rails-universal.md +4 -4
- package/src/docs/versioned/next/tasks/public-roadmap-github.md +15 -15
|
@@ -13,19 +13,19 @@ See: [`docs/implementationPlans/deployment-foundation.md`](../implementationPlan
|
|
|
13
13
|
|
|
14
14
|
## Phase 1: Environment variable reference
|
|
15
15
|
|
|
16
|
-
- [
|
|
16
|
+
- [x] **Task 1.1**: Audit every environment variable in the repo
|
|
17
17
|
- Description: Run `rg -n "process\.env\.[A-Z_]+" --glob '!node_modules' --glob '!*.test.ts'` and `rg -n "EXPO_PUBLIC_[A-Z_]+"` across the repo. Build a complete list of distinct variables with the file and package where each is read. Also check `Constants.expoConfig?.extra` reads in `rtk/src/constants.ts` (and the syncdb equivalent post-#869) since those are configured through `app.json` rather than the environment. Save the raw findings in the PR body.
|
|
18
18
|
- Files: none (findings in the PR body)
|
|
19
19
|
- Depends on: none
|
|
20
20
|
- Acceptance: the list is generated from grep output, not hand-written; every entry names the reading file; `extra`-based config is listed separately from `process.env` reads.
|
|
21
21
|
|
|
22
|
-
- [
|
|
22
|
+
- [x] **Task 1.2**: Complete `docs/reference/environment-variables.md`
|
|
23
23
|
- Description: Restructure the page into tables grouped by concern (Database, Auth — JWT, Auth — Better Auth, AI, Storage, Feature flags, Observability, MCP, Client/build-time). Each row: variable, read by (package), required or optional, default, secret (yes/no), and scope (server runtime / client build-time). Add an explicit callout explaining that `EXPO_PUBLIC_*` variables are inlined into the JavaScript bundle at build time — they are not secrets and cannot be changed without rebuilding. Every variable from Task 1.1 must appear exactly once.
|
|
24
24
|
- Files: `docs/reference/environment-variables.md`
|
|
25
25
|
- Depends on: Task 1.1
|
|
26
26
|
- Acceptance: every variable from the Task 1.1 audit appears; no variable is listed that does not appear in the audit; the build-time callout is present; secrets are marked.
|
|
27
27
|
|
|
28
|
-
- [
|
|
28
|
+
- [x] **Task 1.3**: `[RTK]` Update the `.env.example` files
|
|
29
29
|
- Description: Update `example-backend/.env.example` and `example-frontend/.env.example` so each contains every required variable for that app with safe placeholder values and a one-line comment per variable. Verify no real secret values are present. Add the Better Auth variables to the backend example, commented out, with a note pointing at `docs/how-to/configure-better-auth.md`.
|
|
30
30
|
- Files: `example-backend/.env.example`, `example-frontend/.env.example`
|
|
31
31
|
- Depends on: Task 1.2
|
|
@@ -33,19 +33,19 @@ See: [`docs/implementationPlans/deployment-foundation.md`](../implementationPlan
|
|
|
33
33
|
|
|
34
34
|
## Phase 2: Deployment baseline
|
|
35
35
|
|
|
36
|
-
- [
|
|
36
|
+
- [x] **Task 2.1**: Write `docs/explanation/deployment-baseline.md`
|
|
37
37
|
- Description: Explainer covering the seven baseline requirements from the IP. For each: what it is, why Terreno needs it, and the symptom when it is missing. Requirements 1, 3, and 5 need reproduced symptoms: (1) run the backend against a standalone `mongod` and quote the actual startup or change-stream error; (3) describe what happens to Socket.io on a platform with a short request timeout — cite the reconnect behavior in the client socket code; (5) build the web bundle with `EXPO_PUBLIC_API_URL` unset, then serve it and quote the resulting client-side failure. Requirement 6 must state that `@terreno/api-health` is part of the baseline (IP question DF4).
|
|
38
38
|
- Files: `docs/explanation/deployment-baseline.md` (new)
|
|
39
39
|
- Depends on: Task 1.2
|
|
40
40
|
- Acceptance: all seven requirements documented; symptoms for 1, 3, and 5 are reproduced and quoted verbatim, not paraphrased.
|
|
41
41
|
|
|
42
|
-
- [
|
|
42
|
+
- [x] **Task 2.2**: Add the web output-mode decision table
|
|
43
43
|
- Description: Add a section to `docs/explanation/deployment-baseline.md` with the three-mode table from the IP (`single`, `static`, `server`) covering output shape, API-route support, SSR support, hosting requirements, and current Terreno status. State explicitly: `single` is today's default, `static` is available now and improves SEO, and `server` requires Expo SDK ≥ 55 while the repo catalog is on `~54.0.29` — link PR #779 and [`web-ssr-and-admin-spa`](../implementationPlans/web-ssr-and-admin-spa.md). Verify the current Expo version from the root `package.json` catalog rather than trusting this description.
|
|
44
44
|
- Files: `docs/explanation/deployment-baseline.md`
|
|
45
45
|
- Depends on: Task 2.1
|
|
46
46
|
- Acceptance: table has all three modes with all five columns; the stated Expo version matches the root catalog; no text implies SSR is currently available.
|
|
47
47
|
|
|
48
|
-
- [
|
|
48
|
+
- [x] **Task 2.3**: `[RTK]` Add the multi-environment section
|
|
49
49
|
- Description: Add a section listing exactly what differs between a staging and a production deployment: secret values, `MONGO_URI` (separate cluster or database), `EXPO_PUBLIC_API_URL` (requires a separate web build per environment — call this out, it is the non-obvious one), `corsOrigin`, Better Auth `trustedOrigins` and `BETTER_AUTH_URL`, and feature-flag defaults. Keep it under 40 lines; this is a checklist, not a guide.
|
|
50
50
|
- Files: `docs/explanation/deployment-baseline.md`
|
|
51
51
|
- Depends on: Task 2.2
|
|
@@ -53,25 +53,25 @@ See: [`docs/implementationPlans/deployment-foundation.md`](../implementationPlan
|
|
|
53
53
|
|
|
54
54
|
## Phase 3: Backend container
|
|
55
55
|
|
|
56
|
-
- [
|
|
56
|
+
- [x] **Task 3.1**: Verify and fix the backend's port and host binding
|
|
57
57
|
- Description: Read `example-backend/src/server.ts` and `api/src/expressServer.ts` to determine how the listen port and host are resolved. Confirm the port comes from `process.env.PORT` with a fallback and that the server binds `0.0.0.0` (or Express's default, which is all interfaces — verify rather than assume). If either is wrong for containerized deployment, fix it in the smallest possible change and add a test. If both are already correct, make no code change and record that finding.
|
|
58
58
|
- Files: `example-backend/src/server.ts` and/or `api/src/expressServer.ts` (only if a fix is needed), plus a test
|
|
59
59
|
- Depends on: none
|
|
60
60
|
- Acceptance: running `PORT=9999 bun run backend:dev` serves on 9999; the finding (fixed or already correct) is stated in the PR body with file citations.
|
|
61
61
|
|
|
62
|
-
- [
|
|
62
|
+
- [x] **Task 3.2**: Write the backend Dockerfile
|
|
63
63
|
- Description: Create `example-backend/Dockerfile` as a multi-stage build on `oven/bun:1-slim` (IP question DF2). Stage 1: copy the lockfile and workspace manifests, run `bun install --frozen-lockfile`, then compile the workspace packages the backend depends on (`@terreno/test`, `@terreno/api`, then the rest — mirror the ordering in the root `compile` script). Stage 2: copy only the built output and production dependencies, create and switch to a non-root user, set `ENV NODE_ENV=production`, expose the port, and set the entrypoint. Add a `HEALTHCHECK` hitting the health endpoint. Create `example-backend/.dockerignore` excluding `node_modules`, `.git`, `.env*`, test files, and build caches.
|
|
64
64
|
- Files: `example-backend/Dockerfile` (new), `example-backend/.dockerignore` (new)
|
|
65
65
|
- Depends on: Task 3.1
|
|
66
66
|
- Acceptance: `docker build -f example-backend/Dockerfile .` succeeds from the repo root; the image runs and `curl localhost:$PORT/health` returns `"healthy":true` against an external MongoDB replica set; `docker run` with `--user` unset shows a non-root user via `id`; the final image is under 500 MB.
|
|
67
67
|
|
|
68
|
-
- [
|
|
68
|
+
- [x] **Task 3.3**: Add a Docker build CI job
|
|
69
69
|
- Description: Create `.github/workflows/example-backend-docker.yml` that builds the image on pull requests touching `example-backend/**`, `api/**`, `package.json`, or `bun.lock`. Build only — do not push. Use layer caching. Follow the repo's convention of validating required inputs before use even though this job needs no secrets.
|
|
70
70
|
- Files: `.github/workflows/example-backend-docker.yml` (new)
|
|
71
71
|
- Depends on: Task 3.2
|
|
72
72
|
- Acceptance: the workflow parses as valid YAML; the path filter covers all four inputs; the job does not push an image or require registry credentials.
|
|
73
73
|
|
|
74
|
-
- [
|
|
74
|
+
- [x] **Task 3.4**: Reference the Dockerfile from the docs
|
|
75
75
|
- Description: Add a "Containerizing the backend" section to `docs/explanation/deployment-baseline.md` that explains the Dockerfile's structure and links `example-backend/Dockerfile` as the canonical copy rather than duplicating its contents (per IP question DF1). Call out the three details consumers get wrong: reading `PORT` from the environment, running as non-root, and compiling workspace packages in the right order.
|
|
76
76
|
- Files: `docs/explanation/deployment-baseline.md`
|
|
77
77
|
- Depends on: Task 3.2
|
|
@@ -79,13 +79,13 @@ See: [`docs/implementationPlans/deployment-foundation.md`](../implementationPlan
|
|
|
79
79
|
|
|
80
80
|
## Phase 4: Web build documentation
|
|
81
81
|
|
|
82
|
-
- [
|
|
82
|
+
- [x] **Task 4.1**: `[RTK]` Write `docs/how-to/build-for-web.md`
|
|
83
83
|
- Description: How-to covering: the build command (verify the exact script in `example-frontend/package.json` — do not assume `expo export -p web`), what the output directory contains for the current output mode, setting `EXPO_PUBLIC_API_URL` before the build with an explicit warning that it is inlined into the bundle, the `app.json` `extra` alternative (`BASE_URL`) and how the two interact — check the base-URL resolution priority order in the client package and document it accurately, serving the output locally to verify before deploying, and the SPA-routing requirement (all unknown paths must serve `index.html`) with a note that each host configures this differently. Link the provider guides.
|
|
84
84
|
- Files: `docs/how-to/build-for-web.md` (new), `docs/how-to/README.md`
|
|
85
85
|
- Depends on: Task 2.2
|
|
86
86
|
- Acceptance: the build command matches an actual script; the base-URL priority order matches the client source and cites the file; the local-verification step works; the guide is listed in the how-to index.
|
|
87
87
|
|
|
88
|
-
- [
|
|
88
|
+
- [x] **Task 4.2**: Cross-link the deployment documentation
|
|
89
89
|
- Description: Add a "Deployment" grouping to `docs/how-to/README.md` and `docs/explanation/README.md` listing the baseline explainer, the web build guide, and the provider guides from [`deploy-to-vercel`](../implementationPlans/deploy-to-vercel.md) and [`deploy-to-gcp`](../implementationPlans/deploy-to-gcp.md). Ensure each provider guide links back to the baseline instead of restating the seven requirements.
|
|
90
90
|
- Files: `docs/how-to/README.md`, `docs/explanation/README.md`
|
|
91
91
|
- Depends on: Task 4.1
|
|
@@ -14,19 +14,19 @@ See: [`docs/implementationPlans/docs-reference-coverage.md`](../implementationPl
|
|
|
14
14
|
|
|
15
15
|
## Phase 1: Missing reference pages
|
|
16
16
|
|
|
17
|
-
- [
|
|
17
|
+
- [x] **Task 1.1**: Write `docs/reference/ai.md`
|
|
18
18
|
- Description: Convert `.cursor/rules/ai/00-ai.mdc` into a public reference page. Sections, following `docs/reference/api.md`'s shape: Install; Commands; Architecture (file structure); `AIService` setup and full method table; structured-output helpers (`generateJsonValue`, `generateJsonObject`, `generateJsonArray`) including the JSON-normalization behavior and error logging; temperature presets; the `AIRequest` and `GptHistory` models with field tables; route registrars (`addGptRoutes`, `addGptHistoryRoutes`, `addAiRequestsExplorerRoutes`) with endpoints, methods, and permissions; Langfuse integration; integration example with `setupServer`/`TerrenoApp`; environment variables; conventions; testing (including the mock-model pattern). Verify every symbol against `ai/src/index.ts`. Remove the internal-only conventions that make no sense to a consumer (for example instructions about not mocking `@terreno/api` belong in agent rules, not reference docs — use judgment).
|
|
19
19
|
- Files: `docs/reference/ai.md` (new)
|
|
20
20
|
- Depends on: none
|
|
21
21
|
- Acceptance: every documented symbol appears in `ai/src/index.ts`; the method table lists all `AIService` methods; all three route registrars documented with their permissions; no `.claude/` or `.cursor/` path referenced.
|
|
22
22
|
|
|
23
|
-
- [
|
|
23
|
+
- [x] **Task 1.2**: Write `docs/reference/admin-spa.md`
|
|
24
24
|
- Description: New reference page for `@terreno/admin-spa`, sourced from `admin-spa/README.md` and `admin-spa/src/`. Cover: what the package is (standalone Expo Router web admin SPA plus an Express plugin that serves it), install, the `AdminSpaServeApp` plugin registration with its options, building the SPA, configuring `apiBase`/`routeBase`, how it relates to the embedded `@terreno/admin-frontend` approach and when to choose each, and environment variables. Verify the plugin options against the source and against how `example-backend/src/server.ts` registers it.
|
|
25
25
|
- Files: `docs/reference/admin-spa.md` (new)
|
|
26
26
|
- Depends on: none
|
|
27
27
|
- Acceptance: every option documented exists in the source; includes a "standalone SPA vs embedded screens" decision paragraph; the registration example matches `example-backend/src/server.ts`.
|
|
28
28
|
|
|
29
|
-
- [
|
|
29
|
+
- [x] **Task 1.3**: Write `docs/reference/test.md`
|
|
30
30
|
- Description: New reference page for `@terreno/test`. Cover: what it provides (in-memory MongoDB management for bun test suites), install as a dev dependency, the `bunfig.toml` preload pattern, `setupEnvironment()`, the `TERRENO_TEST_USE_MEMORY_MONGO` / `TERRENO_TEST_MONGODB_URI` / `BUN_TEST_DISABLE_DB` environment variables, and the test-helper exports. Source the preload contract from `admin-backend/AGENTS.md`, `api/src/tests/bunSetup.ts`, and the `backend-test-env` skill. Keep it short — one page.
|
|
31
31
|
- Files: `docs/reference/test.md` (new)
|
|
32
32
|
- Depends on: none
|
|
@@ -40,7 +40,7 @@ See: [`docs/implementationPlans/docs-reference-coverage.md`](../implementationPl
|
|
|
40
40
|
|
|
41
41
|
## Phase 2: Package READMEs
|
|
42
42
|
|
|
43
|
-
- [
|
|
43
|
+
- [x] **Task 2.1**: Define and apply the README template to the four stubs
|
|
44
44
|
- Description: Write the six-section template from the IP (Title/description, Install, Quick start, What's included, Documentation, License/Contributing) and apply it to the four stub READMEs: `ai/README.md` (source: the new `docs/reference/ai.md`), `admin-backend/README.md` (source: `.cursor/rules/admin-backend/00-admin-backend.mdc` + `docs/reference/admin-backend.md`), `admin-frontend/README.md` (same pattern), `api-health/README.md` (source: `api-health/src/`). Each Quick start must be a complete, runnable snippet — not a fragment. Every link absolute.
|
|
45
45
|
- Files: `ai/README.md`, `admin-backend/README.md`, `admin-frontend/README.md`, `api-health/README.md`
|
|
46
46
|
- Depends on: Task 1.1
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Tasks: Infrastructure MCP server (`@terreno/infra-mcp`)
|
|
2
|
+
|
|
3
|
+
Plan: [docs/implementationPlans/infra-mcp.md](../implementationPlans/infra-mcp.md)
|
|
4
|
+
Status: Blocked — Phase 1 RBAC wiring depends on the RBAC module PR ([rbac-permissions.md](../implementationPlans/rbac-permissions.md)). Scaffold/adapter tasks marked (unblocked) can start now.
|
|
5
|
+
|
|
6
|
+
## Phase 1 — Read-only core
|
|
7
|
+
|
|
8
|
+
- [ ] (unblocked) Scaffold `infra-mcp/` workspace package: package.json (catalog deps), tsconfig, biome, bun test setup, root workspace + catalog entries (zod 4, `@modelcontextprotocol/server`, `@better-auth/oauth-provider`, `@better-auth/mcp`)
|
|
9
|
+
- [ ] (unblocked) `src/config.ts`: `defineInfraMcp` config schema (zod), secret resolution (env/Secret Manager), boot validation
|
|
10
|
+
- [ ] (unblocked) `src/server.ts`: Express/TerrenoApp server with SDK v2 `/mcp` endpoint (`createMcpHandler`, `legacy: "stateless"`, `toNodeHandler`) + `/health`
|
|
11
|
+
- [ ] (unblocked) `src/auth.ts`: Better Auth OAuth 2.1 setup — authorization server, RFC 9728 protected-resource metadata, bearer verification middleware; login page flow verified with Cursor and Claude Code
|
|
12
|
+
- [ ] `src/access.ts`: `infraStatements`, default roles (`infra-readonly`, `infra-operator`), `createAccess` wiring, `Mcp-Name`-keyed authz middleware, per-user filtered `tools/list` (**blocked on RBAC PR**)
|
|
13
|
+
- [ ] `src/models/infraAuditLog.ts` + audit middleware around `tools/call` (statuses: allowed/denied/confirmed/rejected/error; per-tool arg redaction)
|
|
14
|
+
- [ ] (unblocked) Integration adapter types + registry (`src/integrations/types.ts`, `registry.ts`)
|
|
15
|
+
- [ ] (unblocked) GCP native adapter (ADC): `gcp_query_logs`, `gcp_list_log_names`, `gcp_query_metrics`, `gcp_list_error_groups`, `gcp_list_cloud_run_services`, `gcp_get_cloud_run_service`
|
|
16
|
+
- [ ] (unblocked) Sentry native adapter (REST + static token): `sentry_search_issues`, `sentry_get_issue`, `sentry_list_issue_events`, `sentry_get_event`
|
|
17
|
+
- [ ] (unblocked) Mongo native adapter (read URI): `mongo_list_collections`, `mongo_collection_schema`, `mongo_find`, `mongo_aggregate` (reject `$out`/`$merge`). Extract the shared read-query/schema logic from `mcp-server/src/local/tools/databaseQuery.ts` + `databaseSchema.ts` into a reusable module both packages import — do not fork copies into infra-mcp (per architectural review)
|
|
18
|
+
- [ ] Admin panel registration (`@terreno/admin-backend`): Users, InfraAuditLog (read-only)
|
|
19
|
+
- [ ] Terraform: `infra_mcp_service` Cloud Run module instance, Artifact Registry, runtime SA with viewer/logging IAM only
|
|
20
|
+
- [ ] Tests: authz matrix (role × tool × tools/list filtering), adapter handlers, audit records, legacy-client fallback
|
|
21
|
+
- [ ] Deploy + end-to-end verification from a real MCP client; docs: `.cursor/rules/infra-mcp/00-infra-mcp.mdc`, AGENTS.md/CLAUDE.md package lists
|
|
22
|
+
- [ ] Roadmap: open the tracking issue from [roadmap-seed-issues.md](../explanation/roadmap-seed-issues.md#infra-mcp) once the IP is Approved, add it to the Terreno Roadmap board, and register `@terreno/infra-mcp` → `area:mcp` in `scripts/issueAreaLabels.ts` + the bug-report package dropdown when the package lands
|
|
23
|
+
|
|
24
|
+
## Phase 2 — Write tier + machine callers
|
|
25
|
+
|
|
26
|
+
- [ ] `confirmWrite` elicitation wrapper; fail-closed behavior for clients without elicitation support
|
|
27
|
+
- [ ] Config override (`confirmWrites: false`) gated by `infra:writeUnconfirmed`; tests for both paths
|
|
28
|
+
- [ ] Write tools: `sentry_resolve_issue`, `sentry_assign_issue`, `gcp_rollback_cloud_run_revision`, `gcp_update_cloud_run_traffic`, `mongo_update_one`, `mongo_delete_one`; widen runtime SA IAM minimally
|
|
29
|
+
- [ ] Service tokens: spike Better Auth `apiKey` plugin; fallback `ServiceToken` model; machine users (`isServiceAccount`) with role assignment; admin surface (token shown once)
|
|
30
|
+
- [ ] Cloud agent migration: `INFRA_MCP_URL` + service token in agent environments; verify log-digging flows; remove `GCP_SA_*` injection; update AGENTS.md Cursor Cloud instructions
|
|
31
|
+
|
|
32
|
+
## Phase 3 — Proxied adapters + remaining vendors
|
|
33
|
+
|
|
34
|
+
- [ ] `ProxiedAdapter`: `@modelcontextprotocol/client` (stdio + HTTP), deny-by-default `allowedTools` with mandatory tier annotations, tool name prefixing, upstream lifecycle management
|
|
35
|
+
- [ ] Reference proxied integration (`@sentry/mcp-server` stdio or `@google-cloud/observability-mcp`) with parity tests against native tools
|
|
36
|
+
- [ ] Expo/EAS native adapter (`EXPO_TOKEN`): build status, update status, submission status (read); trigger tools deferred to write expansion
|
|
37
|
+
- [ ] Vercel native adapter (API token): deployments, logs, project info (read)
|
|
38
|
+
|
|
39
|
+
## Phase 4 — OSS packaging
|
|
40
|
+
|
|
41
|
+
- [ ] `defineInfraMcp` config reference + quickstart docs (website); one-man-shop deploy path (container anywhere)
|
|
42
|
+
- [ ] Publish `@terreno/infra-mcp`; changelog + upgrade notes
|
|
43
|
+
- [ ] Dogfood writeup: our deployment as the reference architecture
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Task List: Migrate CI/CD to CircleCI
|
|
2
|
+
|
|
3
|
+
See: [`docs/implementationPlans/migrate-cicd-to-circleci.md`](../implementationPlans/migrate-cicd-to-circleci.md)
|
|
4
|
+
Research: [`docs/implementationPlans/migrate-cicd-to-circleci-research.md`](../implementationPlans/migrate-cicd-to-circleci-research.md)
|
|
5
|
+
|
|
6
|
+
## Instructions for the implementing agent
|
|
7
|
+
|
|
8
|
+
- Dual-run every phase: CircleCI green → flip required checks → delete GHA twin. Never enable tag publish on both systems.
|
|
9
|
+
- Do not store plaintext GCP JSON keys in CircleCI if OIDC is available; migrate `preview-cleanup` off `GCP_SA_KEY`.
|
|
10
|
+
- Pin orb versions (including `circleci/node` with Bun support ≥7.2.0).
|
|
11
|
+
- Prefer path parameters that mirror existing GHA path filters.
|
|
12
|
+
- Update docs in the same PR that changes the source of truth for how CI runs.
|
|
13
|
+
- After Phase 0, confirm CircleCI project follows the GitHub default branch `master`.
|
|
14
|
+
|
|
15
|
+
## Phase 0: Prerequisites
|
|
16
|
+
|
|
17
|
+
- [ ] **Task 0.1**: Confirm CircleCI org/plan and project link
|
|
18
|
+
- Description: Verify the requester-created CircleCI organization, plan, and that `FlourishHealth/terreno` is connected with permission to report GitHub checks. Enable **dynamic config** / setup workflows for the project. Record org slug + project slug in the IP header or how-to doc.
|
|
19
|
+
- Files: `docs/how-to/circleci.md` (stub OK)
|
|
20
|
+
- Depends on: none (human prerequisite)
|
|
21
|
+
- Acceptance: a manual “hello” pipeline can be triggered from the project; dynamic config is enabled.
|
|
22
|
+
|
|
23
|
+
- [ ] **Task 0.2**: Create CircleCI Contexts (empty shells)
|
|
24
|
+
- Description: Create contexts named in the IP (`terreno-npm`, `terreno-netlify`, `terreno-expo`, `terreno-gcp`, `terreno-e2e`, `terreno-release`, `terreno-agentic`, `terreno-github-api`). Document which GitHub secrets map into each. Do not paste secret values into the repo.
|
|
25
|
+
- Files: `docs/how-to/circleci.md`
|
|
26
|
+
- Depends on: Task 0.1
|
|
27
|
+
- Acceptance: contexts exist; mapping table is complete; access restrictions noted for `terreno-release`.
|
|
28
|
+
|
|
29
|
+
- [ ] **Task 0.3**: Inventory required GitHub checks
|
|
30
|
+
- Description: List current branch-protection required checks and map each to the GHA job `name:` and the future CircleCI job name. Start from `docs/explanation/repository-settings.md` and live settings.
|
|
31
|
+
- Files: `docs/how-to/circleci.md` or a short table in the IP
|
|
32
|
+
- Depends on: none
|
|
33
|
+
- Acceptance: table covers policies, rulesync, package CI, fingerprint, and CD-related checks.
|
|
34
|
+
|
|
35
|
+
## Phase 1: Foundation
|
|
36
|
+
|
|
37
|
+
- [ ] **Task 1.1**: Add setup + continue config skeleton
|
|
38
|
+
- Description: Create `.circleci/config.yml` with `setup: true` using `circleci/path-filtering` (and `circleci/continuation`). Create `.circleci/continue-config.yml` with parameters for each package/area and a no-op `config-ok` job that always runs.
|
|
39
|
+
- Files: `.circleci/config.yml`, `.circleci/continue-config.yml`
|
|
40
|
+
- Depends on: Task 0.1
|
|
41
|
+
- Acceptance: push triggers setup → continuation; `config-ok` is green.
|
|
42
|
+
|
|
43
|
+
- [ ] **Task 1.2**: Shared Bun + cache commands
|
|
44
|
+
- Description: Add reusable commands (inline or orb) for installing Bun via `circleci/node`, `bun install --frozen-lockfile`, and cache keys equivalent to today’s GHA bun cache. Pin Bun policy (`latest` vs pin) consistently with EAS jobs that need a pin.
|
|
45
|
+
- Files: `.circleci/continue-config.yml`
|
|
46
|
+
- Depends on: Task 1.1
|
|
47
|
+
- Acceptance: a sample job restores cache on second run; install is frozen-lockfile.
|
|
48
|
+
|
|
49
|
+
- [ ] **Task 1.3**: Path-filter mapping
|
|
50
|
+
- Description: Encode path → parameter mapping for api, ai, ui, rtk, comms, mcp-server, admin-*, example-*, demo, docs/website, terraform, e2e-relevant sets, matching current workflow path filters.
|
|
51
|
+
- Files: `.circleci/config.yml`
|
|
52
|
+
- Depends on: Task 1.1
|
|
53
|
+
- Acceptance: a docs-only change sets docs/deploy params without setting `run-api`.
|
|
54
|
+
|
|
55
|
+
## Phase 2: Package CI + policy
|
|
56
|
+
|
|
57
|
+
- [ ] **Task 2.1**: Port package CI jobs
|
|
58
|
+
- Description: Port api/ai/rtk/ui/ui-demo/comms/mcp-server/example-frontend/example-backend(+script)/admin-spa CI to CircleCI jobs gated by path params. Include Mongo service where GHA used it. Fix mcp branch filter to `master`.
|
|
59
|
+
- Files: `.circleci/continue-config.yml`, possibly package scripts unchanged
|
|
60
|
+
- Depends on: Task 1.2, Task 1.3
|
|
61
|
+
- Acceptance: dual-run green for each package on a change that touches it; GHA still required.
|
|
62
|
+
|
|
63
|
+
- [ ] **Task 2.2**: Port Docker build-only job
|
|
64
|
+
- Description: Port `example-backend-docker.yml` to CircleCI remote Docker / machine with layer caching replacement for `type=gha`.
|
|
65
|
+
- Files: `.circleci/continue-config.yml`
|
|
66
|
+
- Depends on: Task 2.1
|
|
67
|
+
- Acceptance: PR touching `example-backend/**` builds the image without pushing.
|
|
68
|
+
|
|
69
|
+
- [ ] **Task 2.3**: Port repo-policies + rulesync + DCO
|
|
70
|
+
- Description: Port `repo-policies.yml`, `rulesync-check.yml`, and fork DCO checks. DCO must use GitHub API via `terreno-github-api` context.
|
|
71
|
+
- Files: `.circleci/continue-config.yml`
|
|
72
|
+
- Depends on: Task 0.2, Task 1.2
|
|
73
|
+
- Acceptance: intentional barrel-import / dirty rulesync / missing DCO on a fork PR fails the CircleCI job.
|
|
74
|
+
|
|
75
|
+
- [ ] **Task 2.4**: Dual-run cutover for Phase 2
|
|
76
|
+
- Description: Add CircleCI checks to branch protection; remove GHA package/policy workflows once trusted; delete corresponding `.github/workflows/*-ci.yml` and policy workflows.
|
|
77
|
+
- Files: `.github/workflows/*`, `docs/explanation/repository-settings.md`
|
|
78
|
+
- Depends on: Task 2.1, Task 2.2, Task 2.3
|
|
79
|
+
- Acceptance: required checks are CircleCI-only for these surfaces; GHA files gone.
|
|
80
|
+
|
|
81
|
+
## Phase 3: Playwright E2E
|
|
82
|
+
|
|
83
|
+
- [ ] **Task 3.1**: Port `e2e-ci` and `admin-spa-integration`
|
|
84
|
+
- Description: Mongo replica set, E2E secrets context, Playwright browsers, artifact store for reports. Skip Dependabot-equivalent if applicable.
|
|
85
|
+
- Files: `.circleci/continue-config.yml`
|
|
86
|
+
- Depends on: Task 2.1, Task 0.2
|
|
87
|
+
- Acceptance: matrix (or equivalent) passes on master; artifacts downloadable.
|
|
88
|
+
|
|
89
|
+
- [ ] **Task 3.2**: Dual-run cutover for E2E
|
|
90
|
+
- Description: Flip required checks if any; delete GHA e2e/admin-spa-integration workflows.
|
|
91
|
+
- Files: `.github/workflows/e2e-ci.yml`, `admin-spa-integration.yml`, `admin-spa-ci.yml` as applicable
|
|
92
|
+
- Depends on: Task 3.1
|
|
93
|
+
- Acceptance: GHA twins deleted; CircleCI owns e2e.
|
|
94
|
+
|
|
95
|
+
## Phase 4: Netlify deploys
|
|
96
|
+
|
|
97
|
+
- [ ] **Task 4.1**: Port demo / frontend-example / docs Netlify workflows
|
|
98
|
+
- Description: Build + `netlify-cli` deploy prod/preview; preserve alias naming (`pr-N`); recreate GitHub Deployment statuses via API if still desired.
|
|
99
|
+
- Files: `.circleci/continue-config.yml`
|
|
100
|
+
- Depends on: Task 0.2, Task 1.3
|
|
101
|
+
- Acceptance: preview deploy URL posted or visible; prod deploy on master path filter.
|
|
102
|
+
|
|
103
|
+
- [ ] **Task 4.2**: Preview cleanup port
|
|
104
|
+
- Description: On PR close, clean Netlify/GCP preview resources from CircleCI (webhook or GitHub App → pipeline). Prefer OIDC over `GCP_SA_KEY`.
|
|
105
|
+
- Files: `.circleci/continue-config.yml`
|
|
106
|
+
- Depends on: Task 4.1
|
|
107
|
+
- Acceptance: closing a PR removes preview resources; no orphaned Cloud Run `pr-N` services in a test PR.
|
|
108
|
+
|
|
109
|
+
- [ ] **Task 4.3**: Dual-run cutover for Netlify
|
|
110
|
+
- Description: Delete GHA deploy workflows after CircleCI trusted.
|
|
111
|
+
- Files: `.github/workflows/demo-deploy.yml`, `frontend-example-deploy.yml`, `docs-deploy.yml`, `preview-cleanup.yml`
|
|
112
|
+
- Depends on: Task 4.1, Task 4.2
|
|
113
|
+
- Acceptance: GHA deploy twins deleted.
|
|
114
|
+
|
|
115
|
+
## Phase 5: EAS + fingerprint
|
|
116
|
+
|
|
117
|
+
- [ ] **Task 5.1**: Relocate CI scripts
|
|
118
|
+
- Description: Move EAS/fingerprint shell scripts from `.github/workflows/scripts/` to `scripts/ci/` (or `.circleci/scripts/`) and update callers.
|
|
119
|
+
- Files: `scripts/ci/*`, old script paths
|
|
120
|
+
- Depends on: none
|
|
121
|
+
- Acceptance: scripts runnable locally with documented env; no broken references.
|
|
122
|
+
|
|
123
|
+
- [ ] **Task 5.2**: Port eas-pr, eas-dev-build, fingerprint-gate
|
|
124
|
+
- Description: CircleCI jobs using `EXPO_TOKEN`; PR comments and label gate via GitHub API; manual pipeline for eas-dev-build.
|
|
125
|
+
- Files: `.circleci/continue-config.yml`
|
|
126
|
+
- Depends on: Task 5.1, Task 0.2
|
|
127
|
+
- Acceptance: fingerprint change fails until `fingerprint-acknowledged`; EAS update/build path works on a test PR.
|
|
128
|
+
|
|
129
|
+
- [ ] **Task 5.3**: Dual-run cutover for EAS
|
|
130
|
+
- Description: Delete GHA eas/fingerprint workflows after trust.
|
|
131
|
+
- Files: `.github/workflows/eas-pr.yml`, `eas-dev-build.yml`, `fingerprint-gate.yml`
|
|
132
|
+
- Depends on: Task 5.2
|
|
133
|
+
- Acceptance: GHA twins deleted; CircleCI checks required where fingerprint was required.
|
|
134
|
+
|
|
135
|
+
## Phase 6: GCP CD + OIDC
|
|
136
|
+
|
|
137
|
+
- [ ] **Task 6.1**: Add CircleCI OIDC provider in terraform
|
|
138
|
+
- Description: Extend or add module so GCP trusts CircleCI OIDC alongside GitHub during dual-run. Wire terreno terraform root; document outputs for CircleCI project settings.
|
|
139
|
+
- Files: `terraform/modules/**`, terreno/Flourish terraform roots, `terraform/README.md`
|
|
140
|
+
- Depends on: Task 0.1
|
|
141
|
+
- Acceptance: `gcloud` auth from a CircleCI job succeeds with WIF (no JSON key).
|
|
142
|
+
|
|
143
|
+
- [ ] **Task 6.2**: Port `cd.yml`
|
|
144
|
+
- Description: Path-filtered terraform fmt/preview/apply + Docker build/push + Cloud Run deploys + mcp-test/deploy. Preserve concurrency semantics (do not cancel in-flight prod applies).
|
|
145
|
+
- Files: `.circleci/continue-config.yml`
|
|
146
|
+
- Depends on: Task 6.1
|
|
147
|
+
- Acceptance: terraform preview on PR; apply+deploy on master for a safe test path; GitHub Deployment records optional but documented.
|
|
148
|
+
|
|
149
|
+
- [ ] **Task 6.3**: Dual-run cutover for CD
|
|
150
|
+
- Description: Single deployer: disable GHA `cd.yml` when CircleCI CD is required; remove GitHub OIDC provider only after GHA CD is gone (or keep read-only if other repos need it — document).
|
|
151
|
+
- Files: `.github/workflows/cd.yml`, terraform OIDC
|
|
152
|
+
- Depends on: Task 6.2
|
|
153
|
+
- Acceptance: only CircleCI performs terreno CD; no double apply.
|
|
154
|
+
|
|
155
|
+
## Phase 7: npm publish
|
|
156
|
+
|
|
157
|
+
- [ ] **Task 7.1**: Port publish-on-tag + manual feature-flags publish
|
|
158
|
+
- Description: Reproduce package publish graph, upgrade-docs gate, version bump, Zoom notify, demo dispatch, docs version cut. Use `terreno-release` + `terreno-npm` contexts.
|
|
159
|
+
- Files: `.circleci/continue-config.yml`
|
|
160
|
+
- Depends on: Task 0.2, Task 2.1
|
|
161
|
+
- Acceptance: dry-run or package-by-package rehearsal documented; Zoom path tested against a sandbox webhook if available.
|
|
162
|
+
|
|
163
|
+
- [ ] **Task 7.2**: Single-writer tag cutover
|
|
164
|
+
- Description: In one coordinated change: enable CircleCI tag pipeline; delete/disable `.github/workflows/publish-on-tag.yml` and manual GHA publish; verify no double publish.
|
|
165
|
+
- Files: `.github/workflows/publish-on-tag.yml`, `publish-feature-flags-manual.yml`
|
|
166
|
+
- Depends on: Task 7.1
|
|
167
|
+
- Acceptance: next tag publishes once from CircleCI only.
|
|
168
|
+
|
|
169
|
+
## Phase 8: Mobile (post-v1, required for CC1)
|
|
170
|
+
|
|
171
|
+
- [ ] **Task 8.1**: Port Maestro + Appium Android
|
|
172
|
+
- Description: Port `maestro-e2e` and Android half of `demo-appium-ci` to CircleCI Linux VM with emulator strategy documented.
|
|
173
|
+
- Files: `.circleci/continue-config.yml`
|
|
174
|
+
- Depends on: Task 5.2
|
|
175
|
+
- Acceptance: manual pipeline runs Android Appium and Maestro successfully.
|
|
176
|
+
|
|
177
|
+
- [ ] **Task 8.2**: Port Appium iOS on CircleCI macOS
|
|
178
|
+
- Description: Select macOS resource class/image with Working WDA; port iOS job; compare flake rate to GHA `macos-15`.
|
|
179
|
+
- Files: `.circleci/continue-config.yml`
|
|
180
|
+
- Depends on: Task 8.1
|
|
181
|
+
- Acceptance: iOS Appium green on a representative run; then delete GHA Appium workflow.
|
|
182
|
+
|
|
183
|
+
## Phase 9: GitHub-native + agentic replacements
|
|
184
|
+
|
|
185
|
+
- [ ] **Task 9.1**: Replace CodeQL workflow
|
|
186
|
+
- Description: Implement SARIF upload to GitHub Code Scanning from CircleCI or an approved SAST substitute; delete `codeql-analysis.yml` only when coverage is accepted.
|
|
187
|
+
- Files: `.circleci/continue-config.yml`, `.github/workflows/codeql-analysis.yml`
|
|
188
|
+
- Depends on: Task 0.2
|
|
189
|
+
- Acceptance: Security tab still receives results **or** explicit maintainer sign-off on alternative.
|
|
190
|
+
|
|
191
|
+
- [ ] **Task 9.2**: Replace Dependabot auto-merge + triage + roadmap-generate + docs-audit
|
|
192
|
+
- Description: Implement CircleCI (or Renovate) equivalents; wire issue/schedule triggers without leaving required logic on GHA.
|
|
193
|
+
- Files: `.circleci/continue-config.yml`, corresponding GHA deletions
|
|
194
|
+
- Depends on: Task 0.2
|
|
195
|
+
- Acceptance: each former workflow’s acceptance behavior has an owner on CircleCI; GHA files deleted.
|
|
196
|
+
|
|
197
|
+
- [ ] **Task 9.3**: Replace architectural review + gh-aw agentics
|
|
198
|
+
- Description: Per lockfile (`update-rules`, `update-docs`, daily improvers) and `architectural-pr-review` / `agentics-maintenance`: either port to CircleCI scheduled/PR pipelines with the same scripts or **retire** with maintainer sign-off. CC1 forbids leaving them on GHA.
|
|
199
|
+
- Files: `.github/workflows/*lock*`, `architectural-pr-review.yml`, `agentics-maintenance.yml`, `.circleci/continue-config.yml`
|
|
200
|
+
- Depends on: Task 0.2
|
|
201
|
+
- Acceptance: written retire-or-port decision for each; no gh-aw workflows remain if ported/retired.
|
|
202
|
+
|
|
203
|
+
## Phase 10: Cleanup
|
|
204
|
+
|
|
205
|
+
- [ ] **Task 10.1**: Docs sweep
|
|
206
|
+
- Description: Update CONTRIBUTING, repository-settings, terraform README, deploy guides, AGENTS/Cursor Cloud CI notes to CircleCI-first. Remove stale GHA instructions.
|
|
207
|
+
- Files: `docs/**`, `CONTRIBUTING.md`, `AGENTS.md` / rules as needed
|
|
208
|
+
- Depends on: Phases 2–7 at minimum; 8–9 for full CC1
|
|
209
|
+
- Acceptance: `rg -n "GitHub Actions" docs/explanation/repository-settings.md` and deploy docs reflect CircleCI as source of truth.
|
|
210
|
+
|
|
211
|
+
- [ ] **Task 10.2**: Final GHA workflow purge + IP close
|
|
212
|
+
- Description: Ensure `.github/workflows` has no CI/CD yml left (except intentionally empty dir or README). Update `PLAN_INDEX.md`; archive IP when Complete.
|
|
213
|
+
- Files: `.github/workflows/`, `docs/implementationPlans/PLAN_INDEX.md`
|
|
214
|
+
- Depends on: Task 9.3, Task 10.1, Task 8.2
|
|
215
|
+
- Acceptance: `ls .github/workflows/*.yml` is empty (or only an agreed stub); IP status Complete.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Tasks: Native module baseline for the next major release
|
|
2
|
+
|
|
3
|
+
IP: [native-module-baseline](../implementationPlans/native-module-baseline.md)
|
|
4
|
+
|
|
5
|
+
## Phase 1 — Dependencies + config
|
|
6
|
+
|
|
7
|
+
- [ ] **Task 1.1**: Catalog + app package manifests
|
|
8
|
+
- Description: add the seven packages to root catalog (sorted) and to example-frontend + demo deps via `catalog:`
|
|
9
|
+
- Files: root `package.json`, `example-frontend/package.json`, `demo/package.json`
|
|
10
|
+
- Depends on: none
|
|
11
|
+
- Acceptance: `bun install` + full compile green
|
|
12
|
+
- [ ] **Task 1.2**: Config plugins + build properties
|
|
13
|
+
- Description: stripe + purchases plugins; `expo-build-properties` Kotlin 2.x / compileSdk 36 pins
|
|
14
|
+
- Files: `example-frontend/app.json`, `demo/app.json`
|
|
15
|
+
- Depends on: 1.1
|
|
16
|
+
- Acceptance: `expo config` resolves without errors; web export unaffected
|
|
17
|
+
|
|
18
|
+
## Phase 2 — Builds + verification
|
|
19
|
+
|
|
20
|
+
- [ ] **Task 2.1**: EAS dev builds
|
|
21
|
+
- Description: iOS + Android dev-client builds via existing eas-dev-build workflow
|
|
22
|
+
- Files: `eas.json` profiles if needed
|
|
23
|
+
- Depends on: Phase 1
|
|
24
|
+
- Acceptance: both builds compile
|
|
25
|
+
- [ ] **Task 2.2**: Diagnostics story
|
|
26
|
+
- Description: hidden demo story listing resolved native module versions
|
|
27
|
+
- Files: `demo/stories/NativeModules.stories.tsx`, `demo/demoConfig.tsx`
|
|
28
|
+
- Depends on: 2.1
|
|
29
|
+
- Acceptance: story shows all seven modules on a dev build; screenshot evidence
|
|
30
|
+
- [ ] **Task 2.3**: Expo Go degradation doc
|
|
31
|
+
- Description: document which flows need a dev build (stripe, local-auth) vs preview modes (purchases)
|
|
32
|
+
- Files: `docs/` upgrade note draft
|
|
33
|
+
- Depends on: 2.1
|
|
34
|
+
- Acceptance: reviewed checklist in the note
|
|
35
|
+
|
|
36
|
+
## Phase 3 — Release
|
|
37
|
+
|
|
38
|
+
- [ ] **Task 3.1**: Upgrade note + major release coordination
|
|
39
|
+
- Description: consumer checklist (rebuild dev clients, add plugins, merchant id); breaking-release CI gate
|
|
40
|
+
- Files: upgrade notes location per release process
|
|
41
|
+
- Depends on: Phase 2
|
|
42
|
+
- Acceptance: breaking-release CI gate passes on the release PR
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Tasks: Organizations, teams, and multi-tenant scoping
|
|
2
|
+
|
|
3
|
+
IP: [orgs-and-teams](../implementationPlans/orgs-and-teams.md)
|
|
4
|
+
|
|
5
|
+
## Phase 1 — Models + plugin
|
|
6
|
+
|
|
7
|
+
- [ ] **Task 1.1**: Organization + Membership models
|
|
8
|
+
- Description: schemas per IP (five-type pattern, descriptions, plugins, compound unique index), statics `findActiveForUser`/`isMember`/`isOrgAdmin`
|
|
9
|
+
- Files: `api/src/orgs/organizationModel.ts`, type files
|
|
10
|
+
- Depends on: none
|
|
11
|
+
- Acceptance: unit tests incl. duplicate-membership rejection
|
|
12
|
+
- [ ] **Task 1.2**: `orgScopedPlugin`
|
|
13
|
+
- Description: adds required indexed `organizationId` to a schema
|
|
14
|
+
- Files: `api/src/orgs/orgPlugin.ts`
|
|
15
|
+
- Depends on: 1.1
|
|
16
|
+
- Acceptance: plugin test on a sample schema; save without org fails
|
|
17
|
+
|
|
18
|
+
## Phase 2 — Context + permissions
|
|
19
|
+
|
|
20
|
+
- [ ] **Task 2.1**: Org context middleware
|
|
21
|
+
- Description: `X-Organization-Id` → `req.organization`/`req.membership`; 403 on non-membership; no header → no context
|
|
22
|
+
- Files: `api/src/orgs/orgContext.ts`
|
|
23
|
+
- Depends on: 1.1
|
|
24
|
+
- Acceptance: supertest for member/non-member/missing header
|
|
25
|
+
- [ ] **Task 2.2**: `IsOrgMember`, `IsOrgAdmin`, `OrgQueryFilter`
|
|
26
|
+
- Description: permission methods + query filter (header-scoped or all-memberships)
|
|
27
|
+
- Files: `api/src/orgs/orgPermissions.ts`
|
|
28
|
+
- Depends on: 2.1
|
|
29
|
+
- Acceptance: **tenant isolation suite** — org A member never reads org B rows, incl. crafted `$or`/query-param attempts
|
|
30
|
+
- [ ] **Task 2.3**: modelRouter integration + `preCreate` org injection helper
|
|
31
|
+
- Description: end-to-end org-scoped CRUD on a test model
|
|
32
|
+
- Files: `api/src/orgs/*`, `api/src/tests.ts`
|
|
33
|
+
- Depends on: 2.2
|
|
34
|
+
- Acceptance: create injects context org; list/read/update/delete respect scope
|
|
35
|
+
|
|
36
|
+
## Phase 3 — Routes + app
|
|
37
|
+
|
|
38
|
+
- [ ] **Task 3.1**: `OrgsApp` plugin + org CRUD routes
|
|
39
|
+
- Description: create (with `maxOrgsPerUser`), list-my-orgs, read, patch, soft delete with membership cascade
|
|
40
|
+
- Files: `api/src/orgs/orgsApp.ts`
|
|
41
|
+
- Depends on: Phase 2
|
|
42
|
+
- Acceptance: supertest per route; OpenAPI entries present
|
|
43
|
+
- [ ] **Task 3.2**: Member management routes + last-admin guards
|
|
44
|
+
- Description: list/patch/delete members; cannot demote/remove last admin
|
|
45
|
+
- Files: `api/src/orgs/orgsApp.ts`
|
|
46
|
+
- Depends on: 3.1
|
|
47
|
+
- Acceptance: guard tests pass
|
|
48
|
+
- [ ] **Task 3.3**: `onOrgAudit` hook + exports
|
|
49
|
+
- Description: audit hook mirroring `onAdminAudit`; public exports from `@terreno/api`
|
|
50
|
+
- Files: `api/src/orgs/orgsApp.ts`, `api/src/index.ts`
|
|
51
|
+
- Depends on: 3.1
|
|
52
|
+
- Acceptance: hook fires for create/role-change/delete in tests
|
|
53
|
+
|
|
54
|
+
## Phase 4 — Example + docs
|
|
55
|
+
|
|
56
|
+
- [ ] **Task 4.1**: example-backend org-scoped `Project` model + routes + seeds
|
|
57
|
+
- Description: demo model with `orgScopedPlugin` + `OrgQueryFilter`; seed two orgs with distinct data
|
|
58
|
+
- Files: `example-backend/src/models/project.ts`, `src/api/projects.ts`, `scripts/seed*`
|
|
59
|
+
- Depends on: Phase 3
|
|
60
|
+
- Acceptance: seeded backend proves isolation via curl/supertest
|
|
61
|
+
- [ ] **Task 4.2**: Admin registration + SDK regen
|
|
62
|
+
- Description: register Organization/Membership in AdminApp; `cd example-frontend && bun run sdk`
|
|
63
|
+
- Files: `example-backend/src/server.ts`, `example-frontend/store/openApiSdk.ts`
|
|
64
|
+
- Depends on: 4.1
|
|
65
|
+
- Acceptance: admin panel lists orgs; SDK compiles
|
|
66
|
+
- [ ] **Task 4.3**: Docs
|
|
67
|
+
- Description: `docs/how-to/add-organizations.md`, reference updates, rulesync
|
|
68
|
+
- Files: `docs/how-to/add-organizations.md`, `docs/reference/api.md`, `.rulesync/**`
|
|
69
|
+
- Depends on: Phase 3
|
|
70
|
+
- Acceptance: `bun run rules:check` passes
|