- Add LICENSE-MIT and LICENSE-APACHE for dual MIT / Apache-2.0 distribution - Update root LICENSE pointer, README.md, Deno workspace manifests, and Cargo.toml - Add deno.lock dependency lockfile - Format AGENTS.md system guidelines - Import task lifecycle scaffolding and historical story specifications (extract-auth-yes, setup-ts architecture, modular workspace)
3.8 KiB
3.8 KiB
TASK METADATA
- Target Files:
auth-yes/*spire_ffi/*infra/setup.tsdeno.json
- Core Objective: Extract
auth-yes,spire_ffi, and its related infra scripts and configurations into a pristine, standalone directory representing a new isolated workspace repository. - Dependencies: None.
- Additional Important Notes: The extracted code must represent a modular
Deno workspace containing
sdk/,server/,ui/, andspire_ffi/. All auth-related infra setup must be excised from the parent repository (ed-droid), and theauth-yesdatabases (Postgres, Valkey) must be 100% isolated. The SDK should be ready for potential JSR/Git distribution.
Architectural Considerations & Risks
-
Risks:
- Shared Dependencies: Breaking internal imports inside the
ed-droidmono-repo that rely onauth-yesinternals. Theed-droidcore must pivot to relying purely on HTTP/ForwardAuth and the@auth-yes/sdk. - FFI Rust Compilation: Moving
spire_fficould break relative path cargo configurations,.gitignorebehaviors, or Docker multi-stage build contexts in the new repository. - Infrastructure Script Bloat: Moving setup logic from
infra/setup.tsinto the standalone repo requires untangling Deno CLI commands, file generation logic (e.g.,compose.auth.yml), and configuration parsing currently tightly bound toed-droid's main setup process.
- Shared Dependencies: Breaking internal imports inside the
-
Alternatives:
- Alternative Extraction Tooling: Instead of manually copying and
rewriting imports, we could use Git history rewriting tools (like
git filter-repo) to extractauth-yeswhile preserving git history. However, given the requirement to synthesize a clean staging directory ready forgit init, a structured scripted extraction and clean workspace definition is the preferred, native, and cleaner approach here.
- Alternative Extraction Tooling: Instead of manually copying and
rewriting imports, we could use Git history rewriting tools (like
Proposed Implementation
Phase 1: Establish the Staging Skeleton
- Create an extraction staging directory (e.g.,
.extract_auth_yes/). - Initialize a modular
deno.jsonat the root of the staging directory defining workspaces:sdk,server, andui. - Scaffold the target directories:
sdk/,server/,ui/,spire_ffi/, andinfra/.
Phase 2: Code & Configuration Extraction
- SDK, Server, & UI: Migrate the contents of
auth-yes/sdk,auth-yes/server, andauth-yes/uiinto their respective workspace directories in the staging area. Update internal relative imports. - SDK Export: Ensure
sdk/deno.jsonexportsmod.tscleanly so it can be consumed independently (no JSR publishing required immediately). - Rust FFI: Move
spire_ffi/completely into the staging area. VerifyCargo.tomlandbuild.rspaths remain valid.
Phase 3: Infrastructure Extraction
- Extract
auth-yesand Spire specific setup logic fromed-droid/infra/setup.tsand author a dedicated setup tool in the standalone repository (e.g.,infra/setup.ts). - The standalone repo's setup tool must independently handle
compose.auth.yml,compose.spire.yml, and environment templates. - Completely remove auth and spire logic from the parent
ed-droid/infra/setup.ts.
Phase 4: CI/CD & Docker Boundaries
- Copy and adjust the multi-stage
Dockerfileinto the standalone root, ensuring the build context supports Deno workspaces (e.g., copying the rootdeno.jsonand selectively copying workspace members). - Validate that
auth-yesexplicitly mandates its own PostgreSQL and Valkey data stores, ensuring absolute zero direct database coupling withed-droid.
Phase 5: Final Review & Preparation
- Run
deno fmt,deno lint, anddeno checkagainst the staged workspace. - Ensure the
.extract_auth_yes/directory is pristine, isolated, and ready to be initialized as a fresh remote Git repository (git init).