Projects will target .NET 10 as baseline to align with modern SDK distribution, while remaining compatible with .NET 8/9 for CLI scenarios where required.
PackagingTools.Core exposes interfaces (IPackagingPipeline, ISigningService, IPolicyEvaluator) consumed by GUI/CLI and extension points.
PackagingTools.Plugins compiles independent assemblies that register with the core via MEF-like or DI-based discovery.
Artifacts published to configured destinations; summary persisted for dashboards and CLI output.
4. Install & Configuration Services
Distribution Strategy: Ship the CLI as a .NET global tool (PackagingTools.Cli) with OS-specific re-packaging for environments below SDK 10, mirroring current accelerate flow. GUI binaries distributed via native installers generated by PackagingTools itself.
Initial Configuration Flow:
First-run wizard validates prerequisites (SDK, platform toolchains) and offers to bootstrap missing dependencies.
Users optionally connect to remote services (signing agents, artifact stores) through secure secret entry backed by OS keychains.
CLI honors the same configuration files and environment variables, enabling unattended automation without additional gating.
Offline Support: Provide export/import of dependency caches and configuration bundles so environments without internet access can run packaging pipelines.
Updates: Build scripts under build/ provide commands to check for updates, pre-download toolchains, and roll back if validation fails.
5. Configuration & Persistence
Project Schema: JSON files stored alongside projects with strongly typed models (System.Text.Json) and JSON Schema documents for validation.
Central Store: SQLite (via EF Core) used for metadata such as build history, audit logs, and policy assignments. Optional switch to PostgreSQL for multi-user server deployments.
Secrets: Abstracted ISecretProvider chooses best backend per OS (Windows Credential Manager, macOS Keychain, Linux libsecret); enterprise mode supports Azure Key Vault/HashiCorp Vault connectors.
Caching:build/ scripts manage cached packaging toolchains; metadata stored in SQLite table with checksum to ensure integrity.
6. Diagrams (Mermaid)
flowchart LR
A[Trigger: GUI/CLI/API] --> B[PackagingCoordinator]
B --> C[PolicyEvaluator]
C -->|Approved| D[BuildAgentBroker]
D --> E[PackagingPipeline]
E --> F[SigningService]
F --> G[Verification]
G --> H[Publishers]
H --> I[Telemetry/Audit Store]
sequenceDiagram
participant U as User/Automation
participant GUI as GUI/CLI
participant Coord as PackagingCoordinator
participant Policy as PolicyEvaluator
participant Agent as BuildAgentBroker
participant Pipe as PackagingPipeline
participant Sign as SigningService
participant Repo as AuditRepository
U->>GUI: Start packaging request
GUI->>Coord: StartPackaging(projectId)
Coord->>Policy: Validate(projectId)
Policy-->>Coord: PolicyResult
Coord->>Agent: Allocate(agentSpec)
Agent-->>Coord: BuilderHandle
Coord->>Pipe: Execute(handle, project)
Pipe->>Sign: Sign(artifacts)
Sign-->>Pipe: SigningResult
Pipe->>Repo: RecordAudit(entries)
Repo-->>Pipe: Ack
Pipe-->>Coord: PipelineResult
Coord-->>GUI: PackagingSummary
GUI-->>U: Report status/artifacts
7. Remote Build & Agent Strategy
IBuildAgentBroker manages pools of agents per OS, supporting:
Local execution (default).
Self-hosted agents registered via mutual TLS.
Managed cloud agents (future enterprise add-on).
Agents authenticate using short-lived tokens issued by AgentProvisioningService.
Artifacts transferred via secure channels (SFTP, HTTPS) with checksum validation.
8. Policy & Governance Engine
Policies defined as declarative rules stored in JSON/YAML, evaluated using expression language (e.g., Rego or custom DSL).
Audit trail persisted with immutable event log (append-only table) and exportable to CSV/JSON for compliance.
9. Telemetry & Observability
OpenTelemetry for metrics and traces; Application Insights exporters provided out-of-box.
Privacy controls ensure PII-free logs, with organization-level toggles configured in GUI/CLI.
Diagnostics bundles packaged for support, capturing logs, telemetry snapshots, agent health, and environment metadata.
10. Review & Next Steps
Architecture decision records (ADRs) are tracked in the reference ADR section for major decisions such as runtime targeting, persistence, plugin design, and configuration strategy.