2026-03-27 01:36:18 +00:00
{
inputs = {
ihp . url = " g i t h u b : d i g i t a l l y i n d u c e d / i h p / v 1 . 5 " ;
nixpkgs . follows = " i h p / n i x p k g s " ;
nixpkgs-nixos . follows = " i h p / n i x p k g s - n i x o s " ;
flake-parts . follows = " i h p / f l a k e - p a r t s " ;
devenv . follows = " i h p / d e v e n v " ;
systems . follows = " i h p / s y s t e m s " ;
devenv-root = {
url = " f i l e + f i l e : / / / d e v / n u l l " ;
flake = false ;
} ;
} ;
outputs = inputs @ { self , nixpkgs , nixpkgs-nixos , ihp , flake-parts , systems , . . . }:
flake-parts . lib . mkFlake { inherit inputs ; } {
systems = import systems ;
imports = [ ihp . flakeModules . default ] ;
perSystem = { pkgs , . . . }: {
ihp = {
appName = " i n t e r - h u b " ;
enable = true ;
projectPath = ./. ;
packages = with pkgs ; [
# Native dependencies, e.g. imagemagick
] ;
haskellPackages = p : with p ; [
# Haskell dependencies go here
p . ihp
base
wai
text
# ihp-mail # Email support: https://ihp.digitallyinduced.com/Guide/mail.html
# ihp-datasync # Real-time DataSync
# ihp-job-dashboard # Job dashboard UI
# ihp-typed-sql # Type-safe SQL queries
# ihp-pglistener # PostgreSQL LISTEN/NOTIFY
feat(P5): IHF Phase 5 complete — agent-assisted distillation
Adds bounded AI support to the IHF governance loop. All AI outputs are
attributed (model_ref), reviewable (AgentReviewRecord), and reversible.
No autonomous decisions; no silent requirement promotion.
- T01: Schema — agent_proposals, agent_review_records,
confidence_annotations (migration 1743379200)
- T02: AgentProposalsController (index/show/accept/reject, idempotent
review guard), global nav "Agent" link
- T03: SummarizeClusterAction — Claude API cluster summary on widget show
- T04: DraftRequirementAction — AI requirement draft; acceptance creates
RequirementCandidate (human-gated)
- T05: DetectDuplicatesAction — duplicate_flag proposal on candidate show
- T06: DetectPolicySensitivityAction — policy_flag with
ConfidenceAnnotations per concern scope
- T07: ProposeImplementationAction — impl_proposal from decision show
- T08: AgentAuditDashboardAction — autoRefresh; KPI row, unreviewed queue,
recent proposals, attribution log matrix
- T09: integration tests, SCOPE.md updated, phase5-summary.md, flake.nix
adds http-conduit/aeson/string-conversions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:54:33 +00:00
# Phase 5: Anthropic API calls
http-conduit
aeson
string-conversions
feat(WP-0010): IHF Phase 9 — External API Surface and Consumer SDKs
Delivers the full Phase 9 external API layer:
- Versioned REST API (/api/v2/) with OpenAPI 3.1 spec; enum arrays for
widget_type, event_type, annotation category drawn live from registry tables
- OAuth 2.0 client credentials flow (/api/v2/token); hub:*:write scopes
gated on active HubCapabilityManifest FK
- API key management: SHA256-hashed tokens, key_prefix for display,
one-time reveal on creation, revocation support
- TypeScript and Python consumer SDKs generated from registry tables
(/api/v2/sdk/ihf-client.ts, /api/v2/sdk/ihf-client.py)
- Webhook delivery: HMAC-SHA256 signing, append-only webhook_deliveries,
fire-and-forget dispatch via forkIO, 3-retry logic
- Admin API dashboard with 24h stats (request count, error rate, last seen)
- Rate limiting (per-minute) and daily quota enforcement via api_request_log
- Schema migration: api_consumers, api_keys, webhook_subscriptions (CHECK
constraint on 6 framework lifecycle topics), webhook_deliveries
(append-only trigger), api_request_log
- ARCHITECTURE-LAYERS.md scorecard: 3.34 → 3.41 (approaching Strong)
- contracts/functional/interaction-reporting-v1.md extended with Phase 9
endpoint catalogue and 422 validation error format
GAAF: no bare TEXT discriminators; webhook event_type uses CHECK constraint
over 6 allowed framework lifecycle topic strings (not widget event types).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 19:52:20 +00:00
# Phase 9: External API, crypto, SDK generation
cryptohash-sha256
base16-bytestring
random-bytestring
yaml
network-uri
2026-03-27 01:36:18 +00:00
] ;
devHaskellPackages = p : with p ; [
cabal-install
hlint
hspec
ihp-hspec
] ;
# Hoogle documentation server (enabled by default on port 8002)
# withHoogle = false; # Disable to save memory
# Disable relation type machinery for faster compilation
# relationSupport = false;
# Skip tests/haddock for specific packages to speed up builds
# dontCheckPackages = [ "my-package" ];
# doJailbreakPackages = [ "my-package" ];
# dontHaddockPackages = [ "my-package" ];
# Production build tuning
# optimizationLevel = "2"; # Default: "1", use "2" for more optimized production binaries
# rtsFlags = "-A96m -N"; # GHC runtime flags for compiled binaries
# Mount additional directories under /static/ in production builds
# static.extraDirs = {
# # Frontend = self.packages.${system}.frontend;
# };
# static.makeBundling = true; # Set false if not using Makefile for CSS/JS bundling
} ;
# Custom configuration that will start with `devenv up`
devenv . shells . default = {
# Start Mailhog on local development to catch outgoing emails
# services.mailhog.enable = true;
# PostgreSQL extensions
# services.postgres.extensions = extensions: [ extensions.postgis ];
# Custom processes that don't appear in https://devenv.sh/reference/options/
processes = {
# Uncomment if you use tailwindcss.
# tailwind.exec = "tailwindcss -c tailwind/tailwind.config.js -i ./tailwind/app.css -o static/app.css --watch=always";
} ;
} ;
} ;
# Adding the new NixOS configuration for "production"
# See https://ihp.digitallyinduced.com/Guide/deployment.html#deploying-with-deploytonixos for more info
# Used to deploy the IHP application
flake . nixosConfigurations . " p r o d u c t i o n " = import ./Config/nix/hosts/production/host.nix { inherit inputs ; } ;
} ;
# The following configuration speeds up build times by using the devenv, cachix and digitallyinduced binary caches
# You can add your own cachix cache here to speed up builds. For that uncomment the following lines and replace `CHANGE-ME` with your cachix cache name
nixConfig = {
extra-substituters = [
" h t t p s : / / d e v e n v . c a c h i x . o r g "
" h t t p s : / / c a c h i x . c a c h i x . o r g "
" h t t p s : / / d i g i t a l l y i n d u c e d . c a c h i x . o r g "
# "https://CHANGE-ME.cachix.org"
] ;
extra-trusted-public-keys = [
" d e v e n v . c a c h i x . o r g - 1 : w 1 c L U i 8 d v 3 h n o S P G A u i b Q v + f 9 T Z L r 6 c v / H m 9 X g U 5 0 c w = "
" c a c h i x . c a c h i x . o r g - 1 : e W N H Q l d w U O 7 G 2 V k j p n j D b W w y 4 K Q / H N x h t 7 H 4 S S o M c k M = "
" d i g i t a l l y i n d u c e d . c a c h i x . o r g - 1 : y + w Q v r n x Q + P d E s C t 9 1 r m v v 3 9 q R C Y z E g G Q a l d K 2 6 h C K E = "
# "CHANGE-ME.cachix.org-1:CHANGE-ME-PUBLIC-KEY"
] ;
} ;
}