4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 1 | { |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 2 | lib, |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 3 | runCommand, |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 4 | writeText, |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 5 | roundabout, |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 6 | }: |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 7 | |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 8 | let |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 9 | hooks = writeText "hooks.json" ( |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 10 | builtins.toJSON { |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 11 | hooks = import ./codex-hooks.nix { inherit lib roundabout; }; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 12 | } |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 13 | ); |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 14 | plugin = writeText "plugin.json" ( |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 15 | builtins.toJSON { |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 16 | name = "roundabout"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 17 | version = roundabout.version; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 18 | description = "build admission for agents sharing a machine"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 19 | author.name = "atagen"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 20 | skills = "./skills/"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 21 | interface = { |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 22 | displayName = "Roundabout"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 23 | shortDescription = "Give shared builds room to run"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 24 | longDescription = "Queue builds, notice overdue leases and keep artifacts within budget."; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 25 | developerName = "atagen"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 26 | category = "Productivity"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 27 | capabilities = [ ]; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 28 | defaultPrompt = "Help me run builds through Roundabout."; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 29 | }; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 30 | } |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 31 | ); |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 32 | marketplace = writeText "marketplace.json" ( |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 33 | builtins.toJSON { |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 34 | name = "roundabout"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 35 | interface.displayName = "Roundabout"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 36 | plugins = [ |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 37 | { |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 38 | name = "roundabout"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 39 | source = { |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 40 | source = "local"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 41 | path = "./plugins/roundabout"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 42 | }; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 43 | policy = { |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 44 | installation = "AVAILABLE"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 45 | authentication = "ON_INSTALL"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 46 | }; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 47 | category = "Productivity"; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 48 | } |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 49 | ]; |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 50 | } |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 51 | ); |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 52 | in |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 53 | runCommand "roundabout-codex-plugin-${roundabout.version}" { } '' |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 54 | p=$out/plugins/roundabout |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 55 | mkdir -p $out/.agents/plugins $p/.codex-plugin $p/hooks $p/skills |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 56 | cp ${marketplace} $out/.agents/plugins/marketplace.json |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 57 | cp ${plugin} $p/.codex-plugin/plugin.json |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 58 | cp ${hooks} $p/hooks/hooks.json |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 59 | cp -r ${../plugin/skills}/. $p/skills/ |
4e5ca2e20401 | atagen | 2026-09-28 11:42 UTC | 60 | '' |